From 2c3dda33b92cfd8792294522c2f3af1b8c4c0a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Sat, 5 Aug 2023 12:52:05 -0300 Subject: work on issue 826 --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.c b/src/main.c index e83dad3..4a036a8 100644 --- a/src/main.c +++ b/src/main.c @@ -63,6 +63,7 @@ #include "macros.h" #include "tui.h" #include "input.h" +#include "cmds/cmds_visual.h" #include "marks.h" #include "format.h" #include "maps.h" @@ -655,6 +656,14 @@ void sig_cont() { * \return none */ void sig_int() { + sc_info("Got SIGINT.%s" , curmode != NORMAL_MODE ? " Back to NORMAL_MODE" : " Press «:q» to quit sc-im"); + if (get_bufsize(buffer)) break_waitcmd_loop(buffer); + if (curmode == VISUAL_MODE) exit_visualmode(); + chg_mode('.'); + inputline[0] = L'\0'; // clean inputline + flush_buf(buffer); + ui_update(TRUE); + /* if ( ! get_conf_int("debug")) { sc_error("Got SIGINT. Press «:q» to quit sc-im"); } else if (get_bufsize(buffer)) { @@ -662,6 +671,7 @@ void sig_int() { } else { shall_quit = 2; } + */ return; } -- cgit v1.2.3