tweaks: add a separate function that actually wipes the status bar
Этот коммит содержится в:
родитель
eac90c3eff
Коммит
b574f73e60
@ -372,8 +372,7 @@ int do_lockfile(const char *filename)
|
|||||||
free(promptstr);
|
free(promptstr);
|
||||||
|
|
||||||
if (response < 1) {
|
if (response < 1) {
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
goto free_the_name;
|
goto free_the_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2218,8 +2217,7 @@ int do_writeout(bool exiting, bool withprompt)
|
|||||||
|
|
||||||
response = do_yesno_prompt(FALSE, _("File was modified "
|
response = do_yesno_prompt(FALSE, _("File was modified "
|
||||||
"since you opened it; continue saving? "));
|
"since you opened it; continue saving? "));
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
/* When in tool mode and not called by 'savefile',
|
/* When in tool mode and not called by 'savefile',
|
||||||
* overwrite the file right here when requested. */
|
* overwrite the file right here when requested. */
|
||||||
|
@ -710,8 +710,7 @@ void window_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* In case the terminal shrunk, make sure the status line is clear. */
|
/* In case the terminal shrunk, make sure the status line is clear. */
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
/* Turn the keypad on for the windows, if necessary. */
|
/* Turn the keypad on for the windows, if necessary. */
|
||||||
if (!ISSET(REBIND_KEYPAD)) {
|
if (!ISSET(REBIND_KEYPAD)) {
|
||||||
|
@ -651,8 +651,7 @@ int do_prompt(bool allow_tabs, bool allow_files,
|
|||||||
else if (func == do_enter)
|
else if (func == do_enter)
|
||||||
retval = (*answer == '\0') ? -2 : 0;
|
retval = (*answer == '\0') ? -2 : 0;
|
||||||
|
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
#ifdef ENABLE_TABCOMP
|
#ifdef ENABLE_TABCOMP
|
||||||
/* If we've done tab completion, there might still be a list of
|
/* If we've done tab completion, there might still be a list of
|
||||||
@ -720,8 +719,8 @@ int do_yesno_prompt(bool all, const char *msg)
|
|||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
mvwaddnstr(bottomwin, 0, 0, message, actual_x(message, COLS - 1));
|
mvwaddnstr(bottomwin, 0, 0, message, actual_x(message, COLS - 1));
|
||||||
wattroff(bottomwin, interface_color_pair[TITLE_BAR]);
|
wattroff(bottomwin, interface_color_pair[TITLE_BAR]);
|
||||||
|
|
||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
|
|
||||||
currmenu = MYESNO;
|
currmenu = MYESNO;
|
||||||
|
|
||||||
/* When not replacing, show the cursor while waiting for a key. */
|
/* When not replacing, show the cursor while waiting for a key. */
|
||||||
|
@ -642,6 +642,7 @@ const sc *get_shortcut(int *kbinput);
|
|||||||
void blank_row(WINDOW *win, int y, int x, int n);
|
void blank_row(WINDOW *win, int y, int x, int n);
|
||||||
void blank_edit(void);
|
void blank_edit(void);
|
||||||
void blank_statusbar(void);
|
void blank_statusbar(void);
|
||||||
|
void wipe_statusbar(void);
|
||||||
void blank_bottombars(void);
|
void blank_bottombars(void);
|
||||||
void check_statusblank(void);
|
void check_statusblank(void);
|
||||||
char *display_string(const char *buf, size_t column, size_t span, bool isdata);
|
char *display_string(const char *buf, size_t column, size_t span, bool isdata);
|
||||||
|
@ -347,8 +347,7 @@ int findnextstr(const char *needle, bool whole_word_only, int modus,
|
|||||||
|
|
||||||
/* Wipe the "Searching..." message and unset the suppression flag. */
|
/* Wipe the "Searching..." message and unset the suppression flag. */
|
||||||
if (feedback > 0) {
|
if (feedback > 0) {
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wrefresh(bottomwin);
|
|
||||||
suppress_cursorpos = FALSE;
|
suppress_cursorpos = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
src/text.c
15
src/text.c
@ -2502,8 +2502,7 @@ void do_justify(bool full_justify)
|
|||||||
/* Mark the buffer for unjustified text as empty. */
|
/* Mark the buffer for unjustified text as empty. */
|
||||||
jusbuffer = NULL;
|
jusbuffer = NULL;
|
||||||
|
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
/* Show "Uncut" again in the help lines, and force their redrawing. */
|
/* Show "Uncut" again in the help lines, and force their redrawing. */
|
||||||
uncutfunc->desc = uncut_tag;
|
uncutfunc->desc = uncut_tag;
|
||||||
@ -3322,8 +3321,7 @@ void do_linter(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
free_lints_and_return:
|
free_lints_and_return:
|
||||||
@ -3546,10 +3544,8 @@ void do_verbatim_input(void)
|
|||||||
/* Unsuppress cursor-position display or blank the statusbar. */
|
/* Unsuppress cursor-position display or blank the statusbar. */
|
||||||
if (ISSET(CONSTANT_SHOW))
|
if (ISSET(CONSTANT_SHOW))
|
||||||
suppress_cursorpos = FALSE;
|
suppress_cursorpos = FALSE;
|
||||||
else {
|
else
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Display all the verbatim characters at once, not filtering out
|
/* Display all the verbatim characters at once, not filtering out
|
||||||
* control characters. */
|
* control characters. */
|
||||||
@ -3622,8 +3618,7 @@ void complete_a_word(void)
|
|||||||
pletion_x = 0;
|
pletion_x = 0;
|
||||||
|
|
||||||
/* Wipe the "No further matches" message. */
|
/* Wipe the "No further matches" message. */
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
} else {
|
} else {
|
||||||
/* Remove the attempted completion from the buffer. */
|
/* Remove the attempted completion from the buffer. */
|
||||||
do_undo();
|
do_undo();
|
||||||
|
13
src/winio.c
13
src/winio.c
@ -1810,6 +1810,13 @@ void blank_statusbar(void)
|
|||||||
blank_row(bottomwin, 0, 0, COLS);
|
blank_row(bottomwin, 0, 0, COLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Wipe the status bar clean and include this in the next screen update. */
|
||||||
|
void wipe_statusbar(void)
|
||||||
|
{
|
||||||
|
blank_row(bottomwin, 0, 0, COLS);
|
||||||
|
wnoutrefresh(bottomwin);
|
||||||
|
}
|
||||||
|
|
||||||
/* If the NO_HELP flag isn't set, blank the last two lines of the bottom
|
/* If the NO_HELP flag isn't set, blank the last two lines of the bottom
|
||||||
* portion of the window. */
|
* portion of the window. */
|
||||||
void blank_bottombars(void)
|
void blank_bottombars(void)
|
||||||
@ -1834,10 +1841,8 @@ void check_statusblank(void)
|
|||||||
if (currmenu == MMAIN && ISSET(CONSTANT_SHOW))
|
if (currmenu == MMAIN && ISSET(CONSTANT_SHOW))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (statusblank == 0) {
|
if (statusblank == 0)
|
||||||
blank_statusbar();
|
wipe_statusbar();
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the subwindows overlap, make sure to show the edit window now. */
|
/* If the subwindows overlap, make sure to show the edit window now. */
|
||||||
if (LINES == 1)
|
if (LINES == 1)
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user