mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
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
This commit is contained in:
parent
cc2d37053c
commit
97dcd377e7
@ -3,6 +3,8 @@
|
|||||||
been working for a dozen years.
|
been working for a dozen years.
|
||||||
* src/winio.c (statusbar): Update the screen immediately whenever a
|
* src/winio.c (statusbar): Update the screen immediately whenever a
|
||||||
message has been posted on the status bar.
|
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>
|
2016-02-05 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* doc/texinfo/nano.texi: Condense the descriptions of command-key
|
* doc/texinfo/nano.texi: Condense the descriptions of command-key
|
||||||
|
12
src/nano.c
12
src/nano.c
@ -1346,9 +1346,6 @@ RETSIGTYPE do_continue(int signal)
|
|||||||
/* Restore the terminal to its previous state. */
|
/* Restore the terminal to its previous state. */
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
|
||||||
/* Turn the cursor back on for sure. */
|
|
||||||
curs_set(1);
|
|
||||||
|
|
||||||
/* Redraw the contents of the windows that need it. */
|
/* Redraw the contents of the windows that need it. */
|
||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
@ -1407,9 +1404,6 @@ void regenerate_screen(void)
|
|||||||
/* Restore the terminal to its previous state. */
|
/* Restore the terminal to its previous state. */
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
|
||||||
/* Turn the cursor back on for sure. */
|
|
||||||
curs_set(1);
|
|
||||||
|
|
||||||
/* Do the equivalent of what both mutt and Minimum Profit do:
|
/* Do the equivalent of what both mutt and Minimum Profit do:
|
||||||
* Reinitialize all the windows based on the new screen
|
* Reinitialize all the windows based on the new screen
|
||||||
* dimensions. */
|
* dimensions. */
|
||||||
@ -1610,6 +1604,9 @@ int do_input(bool allow_funcs)
|
|||||||
const sc *s;
|
const sc *s;
|
||||||
bool have_shortcut;
|
bool have_shortcut;
|
||||||
|
|
||||||
|
/* Turn the cursor on when waiting for input. */
|
||||||
|
curs_set(1);
|
||||||
|
|
||||||
/* Read in a character. */
|
/* Read in a character. */
|
||||||
input = get_kbinput(edit);
|
input = get_kbinput(edit);
|
||||||
|
|
||||||
@ -2534,9 +2531,6 @@ int main(int argc, char **argv)
|
|||||||
/* Set up the terminal state. */
|
/* Set up the terminal state. */
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
|
||||||
/* Turn the cursor on for sure. */
|
|
||||||
curs_set(1);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Main: set up windows\n");
|
fprintf(stderr, "Main: set up windows\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -2755,9 +2755,6 @@ const char *do_alt_speller(char *tempfile_name)
|
|||||||
/* Restore the terminal to its previous state. */
|
/* Restore the terminal to its previous state. */
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
|
||||||
/* Turn the cursor back on for sure. */
|
|
||||||
curs_set(1);
|
|
||||||
|
|
||||||
if (!WIFEXITED(alt_spell_status) || WEXITSTATUS(alt_spell_status) != 0) {
|
if (!WIFEXITED(alt_spell_status) || WEXITSTATUS(alt_spell_status) != 0) {
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* Turn the mark back on if it was on before. */
|
/* 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. */
|
/* Restore the terminal to its previous state. */
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
|
||||||
/* Turn the cursor back on for sure. */
|
|
||||||
curs_set(1);
|
|
||||||
|
|
||||||
if (!WIFEXITED(format_status) || WEXITSTATUS(format_status) != 0)
|
if (!WIFEXITED(format_status) || WEXITSTATUS(format_status) != 0)
|
||||||
finalstatus = invocation_error(openfile->syntax->formatter);
|
finalstatus = invocation_error(openfile->syntax->formatter);
|
||||||
else {
|
else {
|
||||||
|
@ -2117,6 +2117,9 @@ void statusbar(const char *msg, ...)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Turn the cursor off while fiddling in the statusbar. */
|
||||||
|
curs_set(0);
|
||||||
|
|
||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
|
|
||||||
bar = charalloc(mb_cur_max() * (COLS - 3));
|
bar = charalloc(mb_cur_max() * (COLS - 3));
|
||||||
|
Loading…
Reference in New Issue
Block a user