Commit 97dcd377 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Turning the cursor off when writing in the status bar,

and ensuring it is on when waiting for input.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 15 deletions
+8 -15
......@@ -3,6 +3,8 @@
been working for a dozen years.
* src/winio.c (statusbar): Update the screen immediately whenever a
message has been posted on the status bar.
* src/winio.c (statusbar), src/nano.c (do_input): Turn the cursor off
when writing in the status bar, and on when waiting for input.
2016-02-05 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Condense the descriptions of command-key
......
......@@ -1346,9 +1346,6 @@ RETSIGTYPE do_continue(int signal)
/* Restore the terminal to its previous state. */
terminal_init();
/* Turn the cursor back on for sure. */
curs_set(1);
/* Redraw the contents of the windows that need it. */
blank_statusbar();
wnoutrefresh(bottomwin);
......@@ -1407,9 +1404,6 @@ void regenerate_screen(void)
/* Restore the terminal to its previous state. */
terminal_init();
/* Turn the cursor back on for sure. */
curs_set(1);
/* Do the equivalent of what both mutt and Minimum Profit do:
* Reinitialize all the windows based on the new screen
* dimensions. */
......@@ -1610,6 +1604,9 @@ int do_input(bool allow_funcs)
const sc *s;
bool have_shortcut;
/* Turn the cursor on when waiting for input. */
curs_set(1);
/* Read in a character. */
input = get_kbinput(edit);
......@@ -2534,9 +2531,6 @@ int main(int argc, char **argv)
/* Set up the terminal state. */
terminal_init();
/* Turn the cursor on for sure. */
curs_set(1);
#ifdef DEBUG
fprintf(stderr, "Main: set up windows\n");
#endif
......
......@@ -2755,9 +2755,6 @@ const char *do_alt_speller(char *tempfile_name)
/* Restore the terminal to its previous state. */
terminal_init();
/* Turn the cursor back on for sure. */
curs_set(1);
if (!WIFEXITED(alt_spell_status) || WEXITSTATUS(alt_spell_status) != 0) {
#ifndef NANO_TINY
/* Turn the mark back on if it was on before. */
......@@ -3300,9 +3297,6 @@ void do_formatter(void)
/* Restore the terminal to its previous state. */
terminal_init();
/* Turn the cursor back on for sure. */
curs_set(1);
if (!WIFEXITED(format_status) || WEXITSTATUS(format_status) != 0)
finalstatus = invocation_error(openfile->syntax->formatter);
else {
......
......@@ -2117,6 +2117,9 @@ void statusbar(const char *msg, ...)
return;
}
/* Turn the cursor off while fiddling in the statusbar. */
curs_set(0);
blank_statusbar();
bar = charalloc(mb_cur_max() * (COLS - 3));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment