feat: use undo instead of delete_backward to revert initial chord keystroke
This commit is contained in:
parent
f0c8e35277
commit
c02dcbaa08
1 changed files with 4 additions and 4 deletions
|
@ -102,22 +102,22 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) !void {
|
|||
|
||||
//chording
|
||||
if (self.last_key.keypress == 'j' and self.last_key.modifiers == 0 and keypress == 'k' and modifiers == 0) {
|
||||
try self.cmd("delete_backward", .{});
|
||||
try self.cmd("undo", .{});
|
||||
try self.cmd("enter_mode", command.fmt(.{"vim/normal"}));
|
||||
return;
|
||||
}
|
||||
if (self.last_key.keypress == 'k' and self.last_key.modifiers == 0 and keypress == 'j' and modifiers == 0) {
|
||||
try self.cmd("delete_backward", .{});
|
||||
try self.cmd("undo", .{});
|
||||
try self.cmd("enter_mode", command.fmt(.{"vim/normal"}));
|
||||
return;
|
||||
}
|
||||
if (self.last_key.keypress == 'f' and self.last_key.modifiers == 0 and keypress == 'j' and modifiers == 0) {
|
||||
try self.cmd("delete_backward", .{});
|
||||
try self.cmd("undo", .{});
|
||||
try self.cmd("enter_mode", command.fmt(.{"vim/normal"}));
|
||||
return;
|
||||
}
|
||||
if (self.last_key.keypress == 'j' and self.last_key.modifiers == 0 and keypress == 'f' and modifiers == 0) {
|
||||
try self.cmd("delete_backward", .{});
|
||||
try self.cmd("undo", .{});
|
||||
try self.cmd("enter_mode", command.fmt(.{"vim/normal"}));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue