From 0b6d820153f43ead4cb252a0622a52c3a11e8fec Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 28 Oct 2024 19:42:43 +0100 Subject: [PATCH] refactor: remove unused mapPress function in move_to_char --- src/tui/mode/mini/move_to_char.zig | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/tui/mode/mini/move_to_char.zig b/src/tui/mode/mini/move_to_char.zig index cfb4d94..c4d0a0d 100644 --- a/src/tui/mode/mini/move_to_char.zig +++ b/src/tui/mode/mini/move_to_char.zig @@ -77,25 +77,6 @@ pub fn receive(_: *Self, _: tp.pid_ref, _: tp.message) error{Exit}!bool { return false; } -fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result { - switch (keypress) { - key.LSUPER, key.RSUPER => return, - key.LSHIFT, key.RSHIFT => return, - key.LCTRL, key.RCTRL => return, - key.LALT, key.RALT => return, - else => {}, - } - return switch (modifiers) { - mod.SHIFT => if (!key.synthesized_p(keypress)) self.execute_operation(egc) else self.cancel(), - 0 => switch (keypress) { - key.ESC => self.cancel(), - key.ENTER => self.cancel(), - else => if (!key.synthesized_p(keypress)) self.execute_operation(egc) else self.cancel(), - }, - else => self.cancel(), - }; -} - fn execute_operation(self: *Self, c: u32) void { const cmd = switch (self.direction) { .left => switch (self.operation) {