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

Minor substring completion changes.

This commit is contained in:
Kris Maglione
2011-10-03 17:46:05 -04:00
parent 24c4acbd38
commit 9d5a2c7670
3 changed files with 10 additions and 9 deletions

View File

@@ -570,9 +570,10 @@ var Editor = Module("editor", {
}
function clear(forward, re)
function _clear(editor) {
function _clear(editor, elem) {
updateRange(editor, forward, re, function (range) {});
editor.selection.deleteFromDocument();
DOM(elem).input();
}
function move(forward, re)
@@ -680,7 +681,7 @@ var Editor = Module("editor", {
bind(["<C-w>"], "Delete previous word",
function () {
if (DOM(dactyl.focusedElement).isInput)
clear(false, /\w/)(Editor.getEditor(null));
clear(false, /\w/)(Editor.getEditor(null), dactyl.focusedElement);
else
editor.executeCommand("cmd_deleteWordBackward", 1);
});