From: David Lawrence Ramsey Date: Sat, 16 Oct 2004 04:56:34 +0000 (+0000) Subject: in do_alt_speller(), call terminal_init() unconditionally after running X-Git-Tag: v1.3.5~126 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=439fbe3e938ba5d40b850495542d383717cb4b70;p=nano.git in do_alt_speller(), call terminal_init() unconditionally after running the alternate spell checker, so that the terminal state is properly restored in all cases git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 3318e0e2..e34ad828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -130,6 +130,10 @@ CVS code - NANO_SMALL is defined and DISABLE_SPELLER isn't. Also, turn the USE_REGEXP flag off during spell checking in order to avoid a potential segfault. (DLR) + do_alt_speller() + - Call terminal_init() unconditionally after running the + alternate spell checker, so that the terminal state is + properly restored in all cases. (DLR) justify_format() - For more compatibility with Pico, remove extra space after a character in punct if that character is the same as the one diff --git a/src/nano.c b/src/nano.c index 5c6ad0f7..8c618b2f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1782,6 +1782,9 @@ const char *do_alt_speller(char *tempfile_name) refresh(); + /* Restore the terminal to its previous state. */ + terminal_init(); + #ifndef NANO_SMALL if (old_mark_set) { do_gotopos(mbb_lineno_cur, mark_beginx, y_cur, 0); @@ -1793,7 +1796,6 @@ const char *do_alt_speller(char *tempfile_name) #endif /* Only reload the temp file if it isn't a marked selection. */ free_filestruct(fileage); - terminal_init(); global_init(TRUE); /* Do what load_buffer() would do, except for making a new