From 5706bdad803135650e2e8c1a5f4bb6fc33812d30 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Tue, 3 Mar 2020 08:58:51 +0000 Subject: [PATCH] Only set last_ex_str if it changes This improves performance of continuous scrolling --- src/lib/controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/controller.ts b/src/lib/controller.ts index 00b16498..f803b5fd 100644 --- a/src/lib/controller.ts +++ b/src/lib/controller.ts @@ -15,7 +15,7 @@ export async function acceptExCmd(exstr: string): Promise { try { const [func, args] = exmode_parser(exstr, stored_excmds) // Stop the repeat excmd from recursing. - if (func !== stored_excmds[""].repeat) state.last_ex_str = exstr + if (func !== stored_excmds[""].repeat && state.last_ex_str != exstr) state.last_ex_str = exstr try { return await func(...args) } catch (e) {