From 1670b1ef2d1358efad636c98abc08c9ff94ccc14 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 7 Mar 2016 17:39:06 +0100 Subject: [PATCH] Fix uncaught error when using VimFx to disable VimFx --- extension/lib/modes.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/lib/modes.coffee b/extension/lib/modes.coffee index ece703a..9ddd75b 100644 --- a/extension/lib/modes.coffee +++ b/extension/lib/modes.coffee @@ -137,7 +137,9 @@ mode('hints', { return storage onLeave: ({vim, storage}) -> - vim.window.setTimeout((-> hints.removeHints(vim.window)), + # When clicking VimFx’s disable button in the Add-ons Manager, `hints` will + # have been `null`ed out when the timeout has passed. + vim.window.setTimeout((-> hints?.removeHints(vim.window)), vim.options.hints_timeout) storage.clearInterval?() for key of storage -- 2.39.3