mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-07 17:35:48 +01:00
Fix buffer.jsm bugs.
This commit is contained in:
@@ -1754,7 +1754,7 @@ var Buffer = Module("Buffer", {
|
|||||||
events.listen(config.browser, "scroll", buffer.closure._updateBufferPosition, false);
|
events.listen(config.browser, "scroll", buffer.closure._updateBufferPosition, false);
|
||||||
},
|
},
|
||||||
mappings: function initMappings(dactyl, modules, window) {
|
mappings: function initMappings(dactyl, modules, window) {
|
||||||
let { Events, buffer, ex, mappings, modes, options, tabs } = modules;
|
let { Editor, Events, buffer, events, ex, mappings, modes, options, tabs } = modules;
|
||||||
|
|
||||||
mappings.add([modes.NORMAL],
|
mappings.add([modes.NORMAL],
|
||||||
["y", "<yank-location>"], "Yank current location to the clipboard",
|
["y", "<yank-location>"], "Yank current location to the clipboard",
|
||||||
@@ -1835,8 +1835,9 @@ var Buffer = Module("Buffer", {
|
|||||||
"Go to the end of the document",
|
"Go to the end of the document",
|
||||||
function (args) {
|
function (args) {
|
||||||
if (args.count)
|
if (args.count)
|
||||||
var elem = options.get("linenumbers").getLine(buffer.focusedFrame.document,
|
var elem = options.get("linenumbers")
|
||||||
args.count);
|
.getLine(buffer.focusedFrame.document,
|
||||||
|
args.count);
|
||||||
if (elem)
|
if (elem)
|
||||||
elem.scrollIntoView(true);
|
elem.scrollIntoView(true);
|
||||||
else if (args.count)
|
else if (args.count)
|
||||||
@@ -2094,7 +2095,7 @@ var Buffer = Module("Buffer", {
|
|||||||
"string", "UTF-8",
|
"string", "UTF-8",
|
||||||
{
|
{
|
||||||
scope: Option.SCOPE_LOCAL,
|
scope: Option.SCOPE_LOCAL,
|
||||||
getter: function () config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset,
|
getter: function () buffer.docShell.QueryInterface(Ci.nsIDocCharset).charset,
|
||||||
setter: function (val) {
|
setter: function (val) {
|
||||||
if (options["encoding"] == val)
|
if (options["encoding"] == val)
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
@@ -296,9 +296,11 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
unload: function unload(window) {
|
cleanup: function cleanup(window) {
|
||||||
overlay.windows = overlay.windows.filter(function (w) w != window);
|
overlay.windows = overlay.windows.filter(function (w) w != window);
|
||||||
|
},
|
||||||
|
|
||||||
|
unload: function unload(window) {
|
||||||
for each (let mod in this.modules.moduleList.reverse()) {
|
for each (let mod in this.modules.moduleList.reverse()) {
|
||||||
mod.stale = true;
|
mod.stale = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user