From 998688570757981a4283b36217831f1d519a9e34 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 17 Sep 2016 11:14:52 +0200 Subject: [PATCH] Don't use wildcards with full URLs in the `gB` command If there is no `location.host` available, such as for `about:*` and `file://` pages, the _entire_ URL is used instead for the suggested blacklist addition in the `gB` command. With this commit, such entire URLs are no longer wrapped in `*` wildcards, as it makes no sense. --- extension/lib/commands.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extension/lib/commands.coffee b/extension/lib/commands.coffee index 76dbcb0..7827920 100644 --- a/extension/lib/commands.coffee +++ b/extension/lib/commands.coffee @@ -895,8 +895,7 @@ commands.reload_config_file = ({vim}) -> commands.edit_blacklist = ({vim}) -> url = vim.browser.currentURI.spec location = new vim.window.URL(url) - domain = location.host or location.href - newPattern = "*#{domain}*" + newPattern = if location.host then "*#{location.host}*" else location.href delimiter = ' ' blacklistString = prefs.get('blacklist') -- 2.39.3