From: Daniel Carl Date: Sat, 8 Jul 2017 22:14:15 +0000 (+0200) Subject: Do not copy variable used only once. X-Git-Url: https://git.owens.tech/git.owens.tech/git.owens.tech/git?a=commitdiff_plain;h=46d6f0d0d77cb76a9eb5d83ccf0ddc4b9471c278;p=vimb.git Do not copy variable used only once. The copy of variable into a shorter one enlarges the codes size when the variable is used only once. So don't copy it. --- diff --git a/src/scripts/hints.js b/src/scripts/hints.js index e75afcb..19b56b8 100644 --- a/src/scripts/hints.js +++ b/src/scripts/hints.js @@ -551,14 +551,13 @@ var hints = Object.freeze((function(){ return show(true); }, update: function(n) { - var pos, - keys = config.hintKeys; + var pos; /* delete last hint-keys filter digit */ if (null === n && filterKeys.length) { filterKeys = filterKeys.slice(0, -1); return show(false); } - if ((pos = keys.indexOf(n)) >= 0) { + if ((pos = config.hintKeys.indexOf(n)) >= 0) { filterKeys = filterKeys + n; return show(true); }