diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-22 18:26:18 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-22 18:26:18 +0100 |
commit | ed8202bd62e00509140d9f036bc813b60852bd16 (patch) | |
tree | af358e150789a57e53c84898897637e6bdb14f32 /interface-ncurses.cpp | |
parent | e62ee37ca5b7019ed63e66338a45630304340bed (diff) | |
download | sciteco-ed8202bd62e00509140d9f036bc813b60852bd16.tar.gz |
support PDCurses user-resizing of the terminal
* there might be curses implementations that don't support KEY_RESIZE at all
* PDCurses does but only with the X11 and SDL versions
* on Windows, the console version might use the SDL DLL (by replacing
pdcurses.dll) so it's fair to keep the window resizing code compiled into
the binary.
* also it's necessary to call resize_term() to update internal structures
* should also work with the Win32a port of PDCurses
Diffstat (limited to 'interface-ncurses.cpp')
-rw-r--r-- | interface-ncurses.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/interface-ncurses.cpp b/interface-ncurses.cpp index a621474..be18b1f 100644 --- a/interface-ncurses.cpp +++ b/interface-ncurses.cpp @@ -300,10 +300,15 @@ InterfaceNCurses::event_loop(void) key = wgetch(cmdline_window); switch (key) { +#ifdef KEY_RESIZE case ERR: case KEY_RESIZE: +#ifdef PDCURSES + resize_term(0, 0); +#endif resize_all_windows(); break; +#endif case ESCAPE_SURROGATE: cmdline_keypress('\x1B'); break; |