1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
/**
* Kill to the end of the current sentence. Emulates the Emacs "kill-sentence"
* command.
*/
source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));
void emacsKillSentence()
{
caret = textArea.getCaretPosition();
eos = findEndOfSentence();
selection = new Selection.Range (caret, eos);
textArea.setSelection (selection);
addToClipboardAndHistory (selection);
textArea.replaceSelection ("");
textArea.removeFromSelection (selection);
}
emacsKillSentence();
|