mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-13 07:05:46 +01:00
Fix <S-Insert> when newlines are involved.
This commit is contained in:
@@ -1040,9 +1040,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
});
|
||||
|
||||
case dactyl.NEW_WINDOW:
|
||||
var handler = Cc['@mozilla.org/browser/clh;1'].getService(Ci.nsIBrowserHandler);
|
||||
let win = window.openDialog(document.documentURI, "_blank", "chrome,all,dialog=no",
|
||||
handler.defaultArgs);
|
||||
let win = window.openDialog(document.documentURI, "_blank", "chrome,all,dialog=no");
|
||||
win.loadURI(url, null, postdata);
|
||||
browser = win.getBrowser();
|
||||
return win.content;
|
||||
|
||||
@@ -45,7 +45,7 @@ var Editor = Module("editor", {
|
||||
let start = elem.selectionStart; // caret position
|
||||
let end = elem.selectionEnd;
|
||||
elem.value = elem.value.substring(0, start) + text + elem.value.substring(end);
|
||||
elem.selectionStart = start + (toStart ? 0 : text.length);
|
||||
elem.selectionStart = Math.min(start + (toStart ? 0 : text.length), elem.value.length);
|
||||
elem.selectionEnd = elem.selectionStart;
|
||||
|
||||
elem.scrollTop = top;
|
||||
|
||||
@@ -160,7 +160,7 @@ function defineModule(name, params) {
|
||||
defineModule.loadLog = [];
|
||||
Object.defineProperty(defineModule.loadLog, "push", {
|
||||
value: function (val) {
|
||||
if (false)
|
||||
if (true)
|
||||
defineModule.dump(val + "\n");
|
||||
this[this.length] = Date.now() + " " + val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user