--- a/mcabber/src/screen.c Fri Jul 29 20:28:06 2005 +0100
+++ b/mcabber/src/screen.c Sat Jul 30 10:36:46 2005 +0100
@@ -202,6 +202,8 @@
initscr();
raw();
noecho();
+ nonl();
+ intrflush(stdscr, FALSE);
start_color();
use_default_colors();
Curses = TRUE;
@@ -1432,7 +1434,7 @@
wmove(inputWnd, 0, ptr_inputline - (char*)&inputLine - inputline_offset);
}
-void scr_handle_sigint(void)
+void scr_handle_CtrlC(void)
{
if (!Curses) return;
// Leave multi-line mode
@@ -1503,7 +1505,7 @@
scr_handle_tab();
check_offset(0);
break;
- case '\n': // Enter
+ case 13: // Enter
case 15: // Ctrl-o ("accept-line-and-down-history")
scr_CheckAutoAway(TRUE);
if (process_line(inputLine))
@@ -1515,7 +1517,7 @@
*ptr_inputline = 0;
inputline_offset = 0;
- if (key == '\n') // Enter
+ if (key == 13) // Enter
{
// Reset history line pointer
cmdhisto_cur = NULL;
@@ -1559,6 +1561,9 @@
ptr_inputline = inputLine;
inputline_offset = 0;
break;
+ case 3: // Ctrl-C
+ scr_handle_CtrlC();
+ break;
case KEY_END:
case 5:
for (; *ptr_inputline; ptr_inputline++) ;