From 4c28b71810df680fba436bda2726c9254bcd28d0 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Thu, 12 Nov 2015 20:00:23 +0100 Subject: [PATCH] Don't stay in "`gi` mode" if only one text input --- extension/lib/commands-frame.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/lib/commands-frame.coffee b/extension/lib/commands-frame.coffee index 2078883..fab96fa 100644 --- a/extension/lib/commands-frame.coffee +++ b/extension/lib/commands-frame.coffee @@ -285,7 +285,10 @@ commands.clear_inputs = ({ storage }) -> commands.move_focus = ({ vim, storage, direction }) -> if storage.inputs index = storage.inputs.indexOf(utils.getActiveElement(vim.content)) - if index == -1 + # If there’s only one input, `` would cycle to itself, making it feel + # like `` was not working. Then it’s better to let `` work as it + # usually does. + if index == -1 or storage.inputs.length <= 1 storage.inputs = null else { inputs } = storage -- 2.39.3