Only set last_ex_str if it changes

This improves performance of continuous scrolling
This commit is contained in:
Oliver Blanthorn 2020-03-03 08:58:51 +00:00
parent 09f6831b0e
commit 5706bdad80
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -15,7 +15,7 @@ export async function acceptExCmd(exstr: string): Promise<any> {
try { try {
const [func, args] = exmode_parser(exstr, stored_excmds) const [func, args] = exmode_parser(exstr, stored_excmds)
// Stop the repeat excmd from recursing. // 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 { try {
return await func(...args) return await func(...args)
} catch (e) { } catch (e) {