mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 23:52:30 +02:00
-TODO: :<Tab> leaves the cursor at the head of the line
This commit is contained in:
1 parent
3671422a3b
commit
4336e740a7
3 files changed
+9
-15
No files matched your search
+3
-9
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user