mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:58:00 +01:00
Fix issue with ?.
This commit is contained in:
@@ -375,7 +375,7 @@ var Buffer = Module("buffer", {
|
||||
* @returns {string}
|
||||
*/
|
||||
get currentWord() Buffer.currentWord(this.focusedFrame),
|
||||
getCurrentWord: deprecated("buffer.currentWord", function getCurrentWord() this.currentWord),
|
||||
getCurrentWord: deprecated("buffer.currentWord", function getCurrentWord() Buffer.currentWord(this.focusedFrame, true)),
|
||||
|
||||
/**
|
||||
* Returns true if a scripts are allowed to focus the given input
|
||||
@@ -1088,7 +1088,7 @@ var Buffer = Module("buffer", {
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
currentWord: function currentWord(win) {
|
||||
currentWord: function currentWord(win, select) {
|
||||
let selection = win.getSelection();
|
||||
if (selection.rangeCount == 0)
|
||||
return "";
|
||||
@@ -1099,6 +1099,10 @@ var Buffer = Module("buffer", {
|
||||
Editor.extendRange(range, true, re, true);
|
||||
Editor.extendRange(range, false, re, true);
|
||||
}
|
||||
if (select) {
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
}
|
||||
return util.domToString(range);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user