1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 08:28:01 +01:00

Import some fixes from Vimperator. Thanks anekos, teramoko, and stepnem.

This commit is contained in:
Kris Maglione
2010-09-18 03:42:48 -04:00
parent bc7cff0442
commit 508cc08a8f
10 changed files with 36 additions and 28 deletions

View File

@@ -1142,8 +1142,9 @@ const CommandLine = Module("commandline", {
// Change the completion text.
// The second line is a hack to deal with some substring
// preview corner cases.
commandline.widgets.command.value = this.prefix + completion + this.suffix;
this.editor.selection.focusNode.textContent = commandline.widgets.command.value;
let value = this.prefix + completion + this.suffix;
commandline.widgets.command.value = value;
this.editor.selection.focusNode.textContent = value;
// Reset the caret to one position after the completion.
this.caret = this.prefix.length + completion.length;