diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-06 09:02:38 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-06 09:06:09 +0200 |
| commit | a53938c70b130f2c9bf13f89d070e220ef8f2b27 (patch) | |
| tree | 5d3dacaec8e6c0747ddf21942e67d0a5179bd57b /src | |
| parent | 1fe63561a81290c8afd3afc47674402194d9651d (diff) | |
completer: fix prev_option, forgot modulu works correctly only with positives
Diffstat (limited to 'src')
| -rw-r--r-- | src/view/completer.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/completer.js b/src/view/completer.js index 675774d8..d73653b5 100644 --- a/src/view/completer.js +++ b/src/view/completer.js @@ -97,7 +97,7 @@ var completer = (function (input_element, dropdown) { update_highlighting(-1); } - function move_option(change, default_value) { + function _move_option(change, default_value) { var next, n = dropdown.children().length; @@ -112,10 +112,10 @@ var completer = (function (input_element, dropdown) { update_highlighting(next); } function next_option() { - move_option(1, 0); + _move_option(1, 0); } function prev_option() { - move_option(-1, dropdown.children().length); + _move_option(dropdown.children().length - 1, dropdown.children().length - 1); } function _get_option(index) { return dropdown.children()[index].innerHTML; |
