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

Don't collapse command-line selection on mode change.

This commit is contained in:
Kris Maglione
2010-10-23 18:12:39 -04:00
parent 6649a81f7d
commit 6f95b33694
4 changed files with 16 additions and 32 deletions

View File

@@ -13,7 +13,6 @@
const Editor = Module("editor", {
init: function () {
// store our last search with f, F, t or T
//
this._lastFindChar = null;
this._lastFindCharFunc = null;
},
@@ -348,10 +347,7 @@ const Editor = Module("editor", {
if (textBox)
textBox.value = val;
else {
let wholeDocRange = editor.document.createRange();
let rootNode = editor.rootElement.QueryInterface(Ci.nsIDOMNode);
wholeDocRange.selectNodeContents(rootNode);
editor.selection.addRange(wholeDocRange);
editor.selection.addRange(RangeFind.nodeRange(editor.rootNode));
editor.selection.deleteFromDocument();
editor.insertText(val);
}