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

Less sucky i_<C-u>.

This commit is contained in:
Kris Maglione
2011-09-28 21:34:21 -04:00
parent a973974203
commit 3f603c5db2

View File

@@ -617,8 +617,13 @@ var Editor = Module("editor", {
function () { function () {
// Deletes the whole line. What the hell. // Deletes the whole line. What the hell.
// editor.executeCommand("cmd_deleteToBeginningOfLine", 1); // editor.executeCommand("cmd_deleteToBeginningOfLine", 1);
let editor_ = Editor.getEditor(null);
editor.executeCommand("cmd_selectBeginLine", 1); editor.executeCommand("cmd_selectBeginLine", 1);
if (editor_ && editor_.selection.isCollapsed) {
editor.executeCommand("cmd_deleteCharBackward", 1);
editor.executeCommand("cmd_selectBeginLine", 1);
}
if (Editor.getController().isCommandEnabled("cmd_delete")) if (Editor.getController().isCommandEnabled("cmd_delete"))
editor.executeCommand("cmd_delete", 1); editor.executeCommand("cmd_delete", 1);
}); });