mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 19:58:09 +01:00
Make use of dactyl.assert in t_<C-t> and v_d actions.
--HG-- extra : rebase_source : 7c7275d3695e98034f542c29fda8dafee2378253
This commit is contained in:
@@ -588,10 +588,8 @@ const Editor = Module("editor", {
|
||||
mappings.add([modes.INSERT],
|
||||
["<C-t>"], "Edit text field in Vi mode",
|
||||
function () {
|
||||
if (!editor.isTextEdit)
|
||||
dactyl.assert(!editor.isTextEdit)
|
||||
modes.push(modes.TEXT_EDIT);
|
||||
else
|
||||
dactyl.beep();
|
||||
});
|
||||
|
||||
mappings.add([modes.INSERT],
|
||||
@@ -686,12 +684,9 @@ const Editor = Module("editor", {
|
||||
mappings.add([modes.VISUAL],
|
||||
["d"], "Delete selected text",
|
||||
function (count) {
|
||||
if (editor.isTextEdit) {
|
||||
dactyl.assert(editor.isTextEdit);
|
||||
editor.executeCommand("cmd_cut");
|
||||
modes.pop();
|
||||
}
|
||||
else
|
||||
dactyl.beep();
|
||||
});
|
||||
|
||||
mappings.add([modes.VISUAL],
|
||||
|
||||
Reference in New Issue
Block a user