1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 05:47:58 +01:00

Fix incorrect completion operation when the caret moves.

This commit is contained in:
Kris Maglione
2010-09-23 21:49:54 -04:00
parent 2fd301c81a
commit 82dc6f3a91
2 changed files with 5 additions and 2 deletions

View File

@@ -1148,6 +1148,7 @@ const CommandLine = Module("commandline", {
// Reset the caret to one position after the completion. // Reset the caret to one position after the completion.
this.caret = this.prefix.length + completion.length; this.caret = this.prefix.length + completion.length;
this._caret = this.caret;
}, },
get caret() this.editor.selection.focusOffset, get caret() this.editor.selection.focusOffset,
@@ -1333,6 +1334,10 @@ const CommandLine = Module("commandline", {
tab: function tab(reverse, wildmode) { tab: function tab(reverse, wildmode) {
commandline._autocompleteTimer.flush(); commandline._autocompleteTimer.flush();
if (this._caret != this.caret)
this.reset();
this._caret = this.caret;
// Check if we need to run the completer. // Check if we need to run the completer.
if (this.context.waitingForTab || this.wildIndex == -1) if (this.context.waitingForTab || this.wildIndex == -1)
this.complete(true, true); this.complete(true, true);

View File

@@ -24,8 +24,6 @@ BUGS:
- the :help version-information page is no longer generated - the :help version-information page is no longer generated
(recent Mercurial regressions): (recent Mercurial regressions):
9 One of the recent completion fixes seems to have broken the caret
position update. BLOCKER.
9 about:pentadactyl is currently about:undefined 9 about:pentadactyl is currently about:undefined
- visual caret mode is broken, requires a manual page focus first anyway or - visual caret mode is broken, requires a manual page focus first anyway or