* src/search.c (do_replace_loop, go_looking, findnextstr): Report
"Cancelled" instead of "Not found" when the user aborts a replace
that is taking too long. This fixes Savannah bug #47439.
+ * src/winio.c (do_replace_highlight): Rename this to 'spotlight',
+ for clarity, and for contrast with 'do_replace/do_replace_loop'.
2016-03-29 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (main), src/text.c (do_justify, do_verbatim_input),
void display_main_list(void);
void do_cursorpos(bool constant);
void do_cursorpos_void(void);
-void do_replace_highlight(bool highlight, const char *word);
+void spotlight(bool active, const char *word);
void xon_complaint(void);
void xoff_complaint(void);
void do_suspend_void(void);
/* Don't show cursor, to not distract from highlighted match. */
curs_set(0);
- do_replace_highlight(TRUE, exp_word);
+ spotlight(TRUE, exp_word);
/* TRANSLATORS: This is a prompt. */
i = do_yesno_prompt(TRUE, _("Replace this instance?"));
- do_replace_highlight(FALSE, exp_word);
+ spotlight(FALSE, exp_word);
free(exp_word);
edit_refresh();
- do_replace_highlight(TRUE, exp_word);
+ spotlight(TRUE, exp_word);
/* Allow all instances of the word to be corrected. */
canceled = (do_prompt(FALSE,
#endif
edit_refresh, _("Edit a replacement")) == -1);
- do_replace_highlight(FALSE, exp_word);
+ spotlight(FALSE, exp_word);
free(exp_word);
/* Highlight the current word being replaced or spell checked. We
* expect word to have tabs and control characters expanded. */
-void do_replace_highlight(bool highlight, const char *word)
+void spotlight(bool active, const char *word)
{
size_t y = xplustabs(), word_len = strlenpt(word);
reset_cursor();
wnoutrefresh(edit);
- if (highlight)
+ if (active)
wattron(edit, hilite_attribute);
/* This is so we can show zero-length matches. */
if (word_len > y)
waddch(edit, '$');
- if (highlight)
+ if (active)
wattroff(edit, hilite_attribute);
}