make cut a command, and add documentation
This commit is contained in:
parent
387790d94c
commit
2b3a950613
3 changed files with 92 additions and 38 deletions
|
|
@ -293,6 +293,18 @@ exports.commands = [{
|
|||
|
||||
// commands disabled in readOnly mode
|
||||
{
|
||||
name: "cut",
|
||||
exec: function(editor) {
|
||||
var range = editor.getSelectionRange();
|
||||
editor._emit("cut", range);
|
||||
|
||||
if (!editor.selection.isEmpty()) {
|
||||
editor.session.remove(range);
|
||||
editor.clearSelection();
|
||||
}
|
||||
},
|
||||
multiSelectAction: "forEach"
|
||||
}, {
|
||||
name: "removeline",
|
||||
bindKey: bindKey("Ctrl-D", "Command-D"),
|
||||
exec: function(editor) { editor.removeLines(); },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue