summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristiam Dywan <christian@twotoasts.de>2019-03-04 22:33:51 +0100
committerChristiam Dywan <christian@twotoasts.de>2019-03-04 22:33:51 +0100
commitce935f178240dc94eff991b83a1e32c2cb3312ef (patch)
tree7ea5a6aa65ab6145215a298ffbd8dcca9c1db705
parent0c5820ffe24295c0550a27537fe34ebc9ae447e8 (diff)
downloadmidori-git-tab_history_dont_use_empty_title.tar.gz
Don't set empty tab title from historytab_history_dont_use_empty_title
Even though a tab was looked up in the history to re-use its title without loading it, the title may be empty. In that case don't set the empty saved title which would override the URL being shown as a fallback.
-rw-r--r--core/tab.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/tab.vala b/core/tab.vala
index 815c5be5..7e9f4137 100644
--- a/core/tab.vala
+++ b/core/tab.vala
@@ -104,7 +104,9 @@ namespace Midori {
var history = HistoryDatabase.get_default (web_context.is_ephemeral ());
var item = yield history.lookup (display_uri);
if (item != null) {
- display_title = item.title;
+ if (item.title != null && item.title != "") {
+ display_title = item.title;
+ }
this.item = item;
}
} catch (DatabaseError error) {