Commit c6512a97 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

screen: don't request an update of the edit window for every yesno prompt

Only when doing replacements does the edit window need a refresh: for
every new spotlight.  So, do the update request in the latter routine.
No related merge requests found
Showing with 3 additions and 5 deletions
+3 -5
...@@ -783,15 +783,12 @@ int do_yesno_prompt(bool all, const char *msg) ...@@ -783,15 +783,12 @@ int do_yesno_prompt(bool all, const char *msg)
onekey("^C", _("Cancel"), width); onekey("^C", _("Cancel"), width);
} }
/* Color the statusbar over its full width and display the question. */
wattron(bottomwin, interface_color_pair[TITLE_BAR]); wattron(bottomwin, interface_color_pair[TITLE_BAR]);
blank_statusbar(); blank_statusbar();
mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1)); mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1));
wattroff(bottomwin, interface_color_pair[TITLE_BAR]); wattroff(bottomwin, interface_color_pair[TITLE_BAR]);
/* Refresh edit window and statusbar before getting input. */
wnoutrefresh(edit);
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
currmenu = MYESNO; currmenu = MYESNO;
......
...@@ -3191,7 +3191,6 @@ void spotlight(bool active, const char *word) ...@@ -3191,7 +3191,6 @@ void spotlight(bool active, const char *word)
room--; room--;
reset_cursor(); reset_cursor();
wnoutrefresh(edit);
if (active) if (active)
wattron(edit, hilite_attribute); wattron(edit, hilite_attribute);
...@@ -3207,6 +3206,8 @@ void spotlight(bool active, const char *word) ...@@ -3207,6 +3206,8 @@ void spotlight(bool active, const char *word)
if (active) if (active)
wattroff(edit, hilite_attribute); wattroff(edit, hilite_attribute);
wnoutrefresh(edit);
} }
#ifndef DISABLE_EXTRA #ifndef DISABLE_EXTRA
......
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