32edd35c7a
Allows to use ctrl+d to close tabs from the buffer completion widget when they are selected. Respects current tab settings like whether you can close the last tab in a window. Had to change the `rebuild()` method to use `setData()` when possible because the selection was being lost if the whole model was being rebuilt. Current problems are: 1) When opening a new window while you already the tab completion open on one window a category is added for the new window but new rows in that category aren't picked up. Interesting if you open a third window then close the second window the completion display is now correct... I can see that the model is being updated correctly but I am not sure why that isn't propagating to the view. Not sure whether it is worth looking into (further) either. 2) Bit of duplication of code, it iterates over the window registry twice. Could put everything in one loop but then that would be dependant on the current behaviour of the `tab_closed` signal being called with the relevant `tabbed_browser` still existing but with the `shutting_down` flag set. 3) I'm still using just the one `rebuild()` method and removing items from the end then calling `setData` on everything rather than having special `on_tab/window_closed` methods (or partial functions) that delete the actual corresponding item. Because if I did that I would also have to special case tab moves etc. |
||
---|---|---|
.. | ||
browser | ||
commands | ||
completion | ||
config | ||
html | ||
img | ||
javascript | ||
keyinput | ||
mainwindow | ||
misc | ||
utils | ||
__init__.py | ||
__main__.py | ||
app.py | ||
qutebrowser.py | ||
resources.py |