From f817a761f00f07b7f57518065da0f5fd8ccf4c9d Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Mon, 13 Apr 2026 14:39:39 +0300 Subject: Add a keybinding to move to start/end --- main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index be36753..25b1142 100644 --- a/main.c +++ b/main.c @@ -159,6 +159,20 @@ int main(int argc, char **argv) { case 'K': clear(); map_offset_y += 10; break; case 'z': clear(); map_offset_x = 2; map_offset_y = 1; break; /* Move to top left corner */ case 'x': clear(); map_offset_x = - width * 2 + COLS - 2; map_offset_y = - height + LINES - 2; break; /* Move to bottom right corner */ + case 'g': + switch (getch()) { + case 's': + clear(); + map_offset_x = -start_pos.x * 2 + COLS/2; + map_offset_y = -start_pos.y + LINES/2; + break; + case 'e': + clear(); + map_offset_x = -end_pos.x * 2 + COLS/2; + map_offset_y = -end_pos.y + LINES/2; + break; + } + break; case 'a': anim = !anim; break; case 'y': case 'o': -- cgit v1.2.3