Misc cleanup and documentation update

This commit is contained in:
Jay Kamat 2017-05-21 22:11:13 -07:00
parent 00f001729b
commit 419793c0b9
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
5 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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')