diff --git a/README.asciidoc b/README.asciidoc index 8e9af00b5..dab5352ed 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -171,11 +171,11 @@ Contributors, sorted by the number of commits in descending order: * Joel Torstensson * Patric Schmitz * Tarcisio Fedrizzi +* Jay Kamat * Claude * Fritz Reichwald * Corentin Julé * meles5 -* Jay Kamat * Philipp Hansch * Panagiotis Ktistakis * Artur Shaik diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 8e37acdac..31493485a 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -907,6 +907,8 @@ Close all tabs except for the current one. === tab-pin Pin/Unpin the current/[count]th tab. +Pinning a tab shrinks it to tabs->pinned-width size. Attempting to close a pinned tab will cause a confirmation, unless --force is passed. + ==== count The tab index to pin or unpin diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 9beb2e9f4..dd51acf26 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -132,7 +132,7 @@ |<>|Width of the progress indicator (0 to disable). |<>|Whether to open windows instead of tabs. |<>|The format to use for the tab title. The following placeholders are defined: -|<>|The format to use for the tab title for pinned tabs.The same placeholders like for title-format are defined. +|<>|The format to use for the tab title for pinned tabs. The same placeholders like for title-format are defined. |<>|Alignment of the text inside of tabs |<>|Switch between tabs using the mouse wheel. |<>|Padding for tabs (top, bottom, left, right). @@ -1262,7 +1262,7 @@ Default: +pass:[{index}: {title}]+ [[tabs-title-format-pinned]] === title-format-pinned -The format to use for the tab title for pinned tabs.The same placeholders like for title-format are defined. +The format to use for the tab title for pinned tabs. The same placeholders like for title-format are defined. Default: +pass:[{index}]+ diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 532ead3d6..01a134422 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -261,6 +261,10 @@ class CommandDispatcher: def tab_pin(self, count=None): """Pin/Unpin the current/[count]th tab. + Pinning a tab shrinks it to tabs->pinned-width size. + Attempting to close a pinned tab will cause a confirmation, + unless --force is passed. + Args: count: The tab index to pin or unpin, or None """ @@ -473,7 +477,6 @@ class CommandDispatcher: """ cmdutils.check_exclusive((bg, window), 'bw') curtab = self._current_widget() - pinned = curtab.data.pinned cur_title = self._tabbed_browser.page_title(self._current_index()) try: history = curtab.history.serialize() @@ -500,7 +503,7 @@ class CommandDispatcher: newtab.data.keep_icon = True newtab.history.deserialize(history) newtab.zoom.set_factor(curtab.zoom.factor()) - new_tabbed_browser.set_tab_pinned(idx, pinned) + new_tabbed_browser.set_tab_pinned(idx, curtab.data.pinned) return newtab @cmdutils.register(instance='command-dispatcher', scope='window') diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 480e97a8d..c5d99cec6 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -727,7 +727,7 @@ def data(readonly=False): fields=['perc', 'perc_raw', 'title', 'title_sep', 'index', 'id', 'scroll_pos', 'host'], none_ok=True), '{index}'), - "The format to use for the tab title for pinned tabs." + "The format to use for the tab title for pinned tabs. " "The same placeholders like for title-format are defined."), ('title-alignment',