Merge branch 'blyxxyz-title_change'
This commit is contained in:
commit
743d2dc327
@ -49,6 +49,8 @@ Changed
|
||||
- Replacements like `{url}` can now also be used in the middle of an argument.
|
||||
Consequently, commands taking another command (`:later`, `:repeat` and
|
||||
`:bind`) now don't immediately evaluate variables.
|
||||
- Tab titles in the `:buffer` completion now update correctly when a page's
|
||||
title is changed via javascript.
|
||||
|
||||
Removed
|
||||
~~~~~~~
|
||||
|
@ -174,6 +174,7 @@ class TabCompletionModel(base.BaseCompletionModel):
|
||||
for i in range(tabbed_browser.count()):
|
||||
tab = tabbed_browser.widget(i)
|
||||
tab.url_changed.connect(self.rebuild)
|
||||
tab.title_changed.connect(self.rebuild)
|
||||
tab.shutting_down.connect(self.delayed_rebuild)
|
||||
tabbed_browser.new_tab.connect(self.on_new_tab)
|
||||
objreg.get("app").new_window.connect(self.on_new_window)
|
||||
@ -187,6 +188,7 @@ class TabCompletionModel(base.BaseCompletionModel):
|
||||
def on_new_tab(self, tab):
|
||||
"""Add hooks to new tabs."""
|
||||
tab.url_changed.connect(self.rebuild)
|
||||
tab.title_changed.connect(self.rebuild)
|
||||
tab.shutting_down.connect(self.delayed_rebuild)
|
||||
self.rebuild()
|
||||
|
||||
|
11
tests/manual/completion/changing_title.html
Normal file
11
tests/manual/completion/changing_title.html
Normal file
@ -0,0 +1,11 @@
|
||||
<head>
|
||||
<title>Old title</title>
|
||||
<script type="text/javascript">
|
||||
setTimeout(function(){ document.title = "New title"; }, 3000);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>This page should change its title after 3s.</p>
|
||||
<p>When opening the :buffer completion ("gt"), the title should update while it's open.</p>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user