summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2023-08-05 12:52:05 -0300
committerAndrés <andmarti@gmail.com>2023-08-05 12:52:05 -0300
commit2c3dda33b92cfd8792294522c2f3af1b8c4c0a85 (patch)
treeb3624b31713ba9c47f822d57899fcac1b13a79b5
parentfca17ce76335d58a381392d170356f7c1fb42764 (diff)
work on issue 826
-rw-r--r--src/main.c10
1 files changed, 10 insertions, 0 deletions
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<Enter>» 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<Enter>» to quit sc-im");
} else if (get_bufsize(buffer)) {
@@ -662,6 +671,7 @@ void sig_int() {
} else {
shall_quit = 2;
}
+ */
return;
}