Close the current tab when the tabbar itself is clicked
This commit is contained in:
parent
3125b69d19
commit
c3e6222296
@ -47,6 +47,8 @@ Changed
|
||||
to frequent crashes due to a Qt bug.
|
||||
- stdin is now closed immediately for processes spawned from qutebrowser
|
||||
- When ui -> message-timeout is set to 0, messages are now never cleared.
|
||||
- Middle/right-clicking the blank parts of the tab bar (when vertical) now
|
||||
closes the current tab.
|
||||
|
||||
Fixed
|
||||
~~~~~
|
||||
|
@ -395,11 +395,12 @@ class TabBar(QTabBar):
|
||||
button = config.get('tabs', 'close-mouse-button')
|
||||
if (e.button() == Qt.RightButton and button == 'right' or
|
||||
e.button() == Qt.MiddleButton and button == 'middle'):
|
||||
e.accept()
|
||||
idx = self.tabAt(e.pos())
|
||||
if idx != -1:
|
||||
e.accept()
|
||||
self.tabCloseRequested.emit(idx)
|
||||
return
|
||||
if idx == -1:
|
||||
idx = self.currentIndex()
|
||||
self.tabCloseRequested.emit(idx)
|
||||
return
|
||||
super().mousePressEvent(e)
|
||||
|
||||
def minimumTabSizeHint(self, index):
|
||||
|
Loading…
Reference in New Issue
Block a user