mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-09 10:24:11 +01:00
Try to move the caret within the viewport on entering Caret or Find mode. Closes issue #170.
This commit is contained in:
@@ -10,6 +10,7 @@ defineModule("finder", {
|
||||
require: ["prefs"]
|
||||
}, this);
|
||||
|
||||
this.lazyRequire("buffer", ["Buffer"]);
|
||||
this.lazyRequire("overlay", ["overlay"]);
|
||||
|
||||
function equals(a, b) XPCNativeWrapper(a) == XPCNativeWrapper(b);
|
||||
@@ -56,6 +57,8 @@ var RangeFinder = Module("rangefinder", {
|
||||
this.commandline;
|
||||
this.CommandMode(mode, this.content).open();
|
||||
|
||||
Buffer(this.content).resetCaret();
|
||||
|
||||
if (this.rangeFind && equals(this.rangeFind.window.get(), this.window))
|
||||
this.rangeFind.reset();
|
||||
this.find("", mode == this.modes.FIND_BACKWARD);
|
||||
|
||||
Reference in New Issue
Block a user