diff --git a/TODO b/TODO index aad3a5b8..a93d0291 100644 --- a/TODO +++ b/TODO @@ -39,7 +39,6 @@ BUGS: - :runtime is broken, possibly Windows only - :regressions is broken, also now blanks the MOW when run - more prompt now reads "-- More --" at the end of multipage output when there is no more content -- : leaves the cursor at the head of the line - wildmode= doesn't work - perhaps it never worked despite being documented FEATURES: diff --git a/content/ui.js b/content/ui.js index 6bf3394a..ec2c8383 100644 --- a/content/ui.js +++ b/content/ui.js @@ -169,17 +169,10 @@ function CommandLine() //{{{ if (full) { if (event.shiftKey) - { completionIndex--; - if (completionIndex < -1) - completionIndex = completions.items.length - 1; - } else - { completionIndex++; - if (completionIndex > completions.items.length) - completionIndex = 0; - } + completionIndex = Math.max(0, Math.min(completions.items.length - 1, completionIndex)); statusTimer.tell(); } @@ -209,7 +202,8 @@ function CommandLine() //{{{ previewClear(); let editor = commandWidget.inputField.editor; - editor.selection.focusNode.textContent = command.substring(0, completions.start) + compl + completionPostfix; + commandWidget.value = command.substring(0, completions.start) + compl + completionPostfix; + editor.selection.focusNode.textContent = commandWidget.value; let range = editor.selection.getRangeAt(0); range.setStart(range.startContainer, completions.start + compl.length); diff --git a/locale/en-US/options.txt b/locale/en-US/options.txt index cd9ebe94..2e478b8b 100644 --- a/locale/en-US/options.txt +++ b/locale/en-US/options.txt @@ -349,11 +349,12 @@ ____ Change the behaviour of [m][m] in hint mode. Possible values: -`---------`---------------------------------------------------------------------------------------------------------------------------------------------------------- -*0* Default behavior. Link is followed as soon as text uniquely identifies it. Pressing [m][m] follows the tab selected hint (if any) or the first link. -*1* Like 0, but don't follow link automatically if text has uniquely identified it. -*2* Like 1, but don't follow first link if there are more than 1 possibilities. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`---------`---------------------------------------------------------- +*0* Follow the first hint as soon as typed text uniquely identifies it. + Follow the selected hint on [m][m]. +*1* Follow the selected hint on [m][m]. +*2* Follow the selected hint on [m][m] only it's been [m][m]-selected. +--------------------------------------------------------------------- ____