Mercurial > hg
comparison mcabber/src/screen.c @ 312:f0b7ff2df7e8
Ctrl-C does not terminate mcabber
1st Ctrl-C abort current completion
2 Ctrl-C in less than 2 seconds leave mcabber
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 14 Jul 2005 23:17:21 +0100 |
parents | 566818afee1c |
children | 1ceb68eb2fc1 |
comparison
equal
deleted
inserted
replaced
311:1d6b16d9c577 | 312:f0b7ff2df7e8 |
---|---|
1480 while (ptr_inputline >= inputline_offset + (char*)&inputLine + maxX) | 1480 while (ptr_inputline >= inputline_offset + (char*)&inputLine + maxX) |
1481 inputline_offset += 5; | 1481 inputline_offset += 5; |
1482 } | 1482 } |
1483 } | 1483 } |
1484 | 1484 |
1485 inline void refresh_inputline(void) | |
1486 { | |
1487 mvwprintw(inputWnd, 0,0, "%s", inputLine + inputline_offset); | |
1488 wclrtoeol(inputWnd); | |
1489 if (*ptr_inputline) | |
1490 wmove(inputWnd, 0, ptr_inputline - (char*)&inputLine - inputline_offset); | |
1491 } | |
1492 | |
1493 void scr_handle_sigint(void) | |
1494 { | |
1495 scr_LogPrint("In screen. completion_started=%d", completion_started); | |
1496 // Same as Ctrl-g, now | |
1497 scr_cancel_current_completion(); | |
1498 scr_end_current_completion(); | |
1499 check_offset(-1); | |
1500 refresh_inputline(); | |
1501 } | |
1502 | |
1485 // process_key(key) | 1503 // process_key(key) |
1486 // Handle the pressed key, in the command line (bottom). | 1504 // Handle the pressed key, in the command line (bottom). |
1487 int process_key(int key) | 1505 int process_key(int key) |
1488 { | 1506 { |
1489 if (isprint(key)) { | 1507 if (isprint(key)) { |
1645 } | 1663 } |
1646 } | 1664 } |
1647 } | 1665 } |
1648 if (completion_started && key != 9 && key != KEY_RESIZE) | 1666 if (completion_started && key != 9 && key != KEY_RESIZE) |
1649 scr_end_current_completion(); | 1667 scr_end_current_completion(); |
1650 mvwprintw(inputWnd, 0,0, "%s", inputLine + inputline_offset); | 1668 refresh_inputline(); |
1651 wclrtoeol(inputWnd); | 1669 if (!update_roster) |
1652 if (*ptr_inputline) { | |
1653 wmove(inputWnd, 0, ptr_inputline - (char*)&inputLine - inputline_offset); | |
1654 } | |
1655 if (!update_roster) { | |
1656 //update_panels(); | |
1657 doupdate(); | 1670 doupdate(); |
1658 } | |
1659 return 0; | 1671 return 0; |
1660 } | 1672 } |