mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 00:28:00 +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],
|
mappings.add([modes.INSERT],
|
||||||
["<C-t>"], "Edit text field in Vi mode",
|
["<C-t>"], "Edit text field in Vi mode",
|
||||||
function () {
|
function () {
|
||||||
if (!editor.isTextEdit)
|
dactyl.assert(!editor.isTextEdit)
|
||||||
modes.push(modes.TEXT_EDIT);
|
modes.push(modes.TEXT_EDIT);
|
||||||
else
|
|
||||||
dactyl.beep();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add([modes.INSERT],
|
mappings.add([modes.INSERT],
|
||||||
@@ -686,12 +684,9 @@ const Editor = Module("editor", {
|
|||||||
mappings.add([modes.VISUAL],
|
mappings.add([modes.VISUAL],
|
||||||
["d"], "Delete selected text",
|
["d"], "Delete selected text",
|
||||||
function (count) {
|
function (count) {
|
||||||
if (editor.isTextEdit) {
|
dactyl.assert(editor.isTextEdit);
|
||||||
editor.executeCommand("cmd_cut");
|
editor.executeCommand("cmd_cut");
|
||||||
modes.pop();
|
modes.pop();
|
||||||
}
|
|
||||||
else
|
|
||||||
dactyl.beep();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add([modes.VISUAL],
|
mappings.add([modes.VISUAL],
|
||||||
|
|||||||
Reference in New Issue
Block a user