1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:17:59 +01:00

Fix buffer.getCurrentWord when the selection is collapsed and the word has punctuation.

This commit is contained in:
Kris Maglione
2009-01-14 23:26:40 -05:00
parent df2443d67c
commit 0b682ef42b
3 changed files with 11 additions and 18 deletions

View File

@@ -985,6 +985,7 @@ function Buffer() //{{{
selController.wordMove(false, false);
selController.wordMove(true, true);
selController.setCaretEnabled(caretmode);
return String.match(selection, /\w*/)[0];
}
let range = selection.getRangeAt(0);
if (util.computedStyle(range.startContainer).whiteSpace == "pre"