aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-07-12 11:22:25 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-07-12 11:22:25 -0400
commit3b7c1bc7e689cfbde7d6c4fcba8d946c0c930aa7 (patch)
tree622ff177a4e0a23c348749231a6e0e3f5986cea1 /src/textadept.c
parent8f10efb6aa82ac98976f116044a7d23520b68600 (diff)
downloadtextadept-3b7c1bc7e689cfbde7d6c4fcba8d946c0c930aa7.tar.gz
textadept-3b7c1bc7e689cfbde7d6c4fcba8d946c0c930aa7.zip
Restore termios after running CDK widgets; src/textadept.c
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 5e72ac30..411a049a 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -63,6 +63,7 @@ typedef GtkWidget Scintilla;
#define SS(view, m, w, l) scintilla_send_message(view, m, w, l)
#define focus_view(v) \
SS(focused_view, SCI_SETFOCUS, 0, 0), SS(v, SCI_SETFOCUS, 1, 0)
+static struct termios term;
#endif
// Window
@@ -405,6 +406,7 @@ static int lfind_focus(lua_State *L) {
destroyCDKEntry(find_entry), destroyCDKEntry(replace_entry);
destroyCDKButtonbox(buttonbox), destroyCDKButtonbox(optionbox);
delwin(findbox->window), destroyCDKScreen(findbox), findbox = NULL;
+ tcsetattr(0, TCSANOW, &term);
#endif
return 0;
}
@@ -544,6 +546,7 @@ static int lce_focus(lua_State *L) {
curs_set(0);
destroyCDKEntry(command_entry), command_entry = NULL;
delwin(screen->window), destroyCDKScreen(screen);
+ tcsetattr(0, TCSANOW, &term);
#endif
return 0;
}
@@ -2264,7 +2267,6 @@ int main(int argc, char **argv) {
#endif
#elif NCURSES
// Ignore some termios (from GNU Nano).
- struct termios term;
tcgetattr(0, &term);
term.c_iflag &= ~IEXTEN, term.c_iflag &= ~IXON;
term.c_oflag &= ~OPOST;