From 98820ed05ec9d68563aa6bfcaa03ced5ebcf48e5 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sun, 11 Sep 2016 15:58:03 +0200 Subject: [PATCH] Properly hide notifications In order to show the characters you have typed so far when filtering hint markers by element text, commit ae106db9 changed the logic for when notifications are hidden due to key presses. Previously, notifications were hidden unconditionally when the pressed key is not part of any shortcut, or caused a command to be run. Now, it is up to every mode to deal with those cases. So that logic has essentially been moved into Normal mode, and partly into Marks mode and Caret mode as well. The `` command now also explicitly hides notifications. --- extension/lib/commands.coffee | 1 + extension/lib/modes.coffee | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/extension/lib/commands.coffee b/extension/lib/commands.coffee index 49be823..159b27d 100644 --- a/extension/lib/commands.coffee +++ b/extension/lib/commands.coffee @@ -917,6 +917,7 @@ commands.dev = ({vim}) -> commands.esc = ({vim}) -> vim._run('esc') + vim.hideNotification() utils.blurActiveBrowserElement(vim) vim.window.gBrowser.getFindBar().close() MarkerContainer.remove(vim.window) # Better safe than sorry. diff --git a/extension/lib/modes.coffee b/extension/lib/modes.coffee index b888ab9..cd82e99 100644 --- a/extension/lib/modes.coffee +++ b/extension/lib/modes.coffee @@ -65,6 +65,8 @@ mode('normal', { {vim, storage, uiEvent} = args {keyStr} = match + vim.hideNotification() if match.type in ['none', 'full'] + if match.type == 'none' or (match.likelyConflict and not match.specialKeys['']) match.discard() @@ -143,6 +145,7 @@ mode('caret', { storage.removeListener = null onInput: (args, match) -> + args.vim.hideNotification() if match.type == 'full' match.command.run(args) return true @@ -367,5 +370,6 @@ mode('marks', { return true }, { exit: ({vim}) -> + vim.hideNotification() vim._enterMode('normal') }) -- 2.39.3