From 56034b05e8ba607459d41c78ceea56110b9e3adf Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Tue, 30 Aug 2016 07:50:30 +0200 Subject: [PATCH] Fix missing hint marker activation feedback for `v` --- extension/lib/modes.coffee | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/extension/lib/modes.coffee b/extension/lib/modes.coffee index 145d7cd..7fb020e 100644 --- a/extension/lib/modes.coffee +++ b/extension/lib/modes.coffee @@ -228,10 +228,17 @@ mode('hints', { matchedMarkers = markerContainer.matchHintChar(match.unmodifiedKey) if matchedMarkers.length > 0 + # Prevent `onLeave` from removing the markers immediately. (The callback + # might enter another mode.) + storage.markerContainer = null + again = callback(matchedMarkers[0], storage.count, match.keyStr) storage.count -= 1 if again + # Add the container back again. + storage.markerContainer = markerContainer + vim.window.setTimeout((-> marker.markMatched(false) for marker in matchedMarkers return @@ -245,9 +252,6 @@ mode('hints', { markerContainer.remove() unless vim.mode == 'hints' ), vim.options.hints_timeout) - # Prevent `onLeave` from removing the markers immediately. - storage.markerContainer = null - # The callback might have entered another mode. Only go back to Normal # mode if we’re still in Hints mode. vim._enterMode('normal') if vim.mode == 'hints' -- 2.39.3