1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:27:59 +01:00

Don't blow up if the user hasn't yet clicked the content when moving around in caret mode.

This commit is contained in:
Kris Maglione
2010-09-24 10:35:27 -04:00
parent 4b5c0d1f84
commit 296ceee3d2
2 changed files with 5 additions and 2 deletions

View File

@@ -424,6 +424,11 @@ const Editor = Module("editor", {
count = 1; count = 1;
let controller = buffer.selectionController; let controller = buffer.selectionController;
let sel = controller.getSelection(controller.SELECTION_NORMAL);
if (!sel.rangeCount) // Hack.
sel.addRange(RangeFind.endpoint(
RangeFind.nodeRange(tabs.localStore.focusedFrame.document.documentElement),
true));
while (count--) while (count--)
controller[caretModeMethod](caretModeArg, false); controller[caretModeMethod](caretModeArg, false);
}, },

View File

@@ -25,8 +25,6 @@ BUGS:
(recent Mercurial regressions): (recent Mercurial regressions):
9 about:pentadactyl is currently about:undefined 9 about:pentadactyl is currently about:undefined
- visual caret mode is broken, requires a manual page focus first anyway or
else it chucks, I haven't investigated --djk
- messages is still broken in several ways - needs testing. - messages is still broken in several ways - needs testing.
=> :ls | :echomsg "Foobar" doesn't add "Foobar" to the already open MOW. => :ls | :echomsg "Foobar" doesn't add "Foobar" to the already open MOW.
(NOTE: an intentional design decision by MS - Boo!) (NOTE: an intentional design decision by MS - Boo!)