diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-18 16:24:32 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-22 04:05:02 +0200 |
commit | 8101cec729c07fd5bdeda70c12dbb43a2383cbe8 (patch) | |
tree | 41b212abb27bfe432e9de526425651c35652577a /src/interface-curses.h | |
parent | 5cc4daf4d51c4f17a824bd8a3ce04257e865f02c (diff) | |
download | sciteco-8101cec729c07fd5bdeda70c12dbb43a2383cbe8.tar.gz |
major Curses UI revision: initialize curses as late as possible
* relies on a patched version of Scinterm that allows you to
construct Scintilla objects, send messages etc. before Curses
is initialized.
The Scintilla and Scinterm submodules have been updated.
* This once and for all fixes batch mode and stdio redirections
in batch mode on all Curses platforms and operating systems.
* Fixes the ^C-does-not-interrupt bug on ncurses/UNIX.
See #4.
* On ncurses/UNIX we will still do a newterm()-initialization.
This allows us to keep stdout/stderr alone in case they are
redirected. This effectively allows redirecting SciTECO's
output into a file even in interactive mode.
ncurses/UNIX now behaves like, e.g. PDCurses/win32a and GTK+
in this regard.
* Curses environment variable handling fixed.
The environment registers are exported into the process environment
so that Curses environment variables can be set/modified by the
SciTECO profile.
* Use term.h for accessing terminfo now.
Explained set_window_title() limitations.
* fixed interruption via SIGINT. If the UI is waiting for user
input, SIGINT is effectively ignored instead of letting the
next character fail always.
* Updated sciteco(1) and sciteco(7): More options, environment variables
and signals documented. Also rewritten DESCRIPTION section
(different modes of operation).
Diffstat (limited to 'src/interface-curses.h')
-rw-r--r-- | src/interface-curses.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/interface-curses.h b/src/interface-curses.h index 971d2fa..471b462 100644 --- a/src/interface-curses.h +++ b/src/interface-curses.h @@ -44,8 +44,8 @@ public: { /* * NOTE: This deletes/frees the view's - * curses WINDOW, despite of what Scinterm's - * documentation says. + * curses WINDOW, despite of what old versions + * of the Scinterm documentation claim. */ if (sci) scintilla_delete(sci); @@ -72,6 +72,7 @@ public: } ViewCurrent; typedef class InterfaceCurses : public Interface<InterfaceCurses, ViewCurses> { + int stdout_orig, stderr_orig; SCREEN *screen; FILE *screen_tty; @@ -100,7 +101,8 @@ typedef class InterfaceCurses : public Interface<InterfaceCurses, ViewCurses> { } popup; public: - InterfaceCurses() : screen(NULL), + InterfaceCurses() : stdout_orig(-1), stderr_orig(-1), + screen(NULL), screen_tty(NULL), info_window(NULL), info_current(NULL), @@ -146,8 +148,9 @@ public: void event_loop_impl(void); private: - void init_batch(void); + void init_screen(void); void init_interactive(void); + void restore_batch(void); void resize_all_windows(void); |