Commit e19449ec authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

actually use statusbar_pww in the statusbar prompt code to cut down on

redundant updates, add related functions to do that, and rename a few of
the statusbar prompt functions for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 117 additions and 59 deletions
+117 -59
...@@ -61,13 +61,18 @@ CVS code - ...@@ -61,13 +61,18 @@ CVS code -
do_browser(), and do_browse_from() (all moved to browser.c). do_browser(), and do_browse_from() (all moved to browser.c).
(DLR) (DLR)
- Add the statusbar prompt's equivalent of placewewant, - Add the statusbar prompt's equivalent of placewewant,
statusbar_pww, to prompt.c, and convert (most of) its statusbar_pww, to prompt.c, and convert its functions to use
functions to use it. Changes to do_statusbar_mouse(), it. New functions reset_statusbar_cursor() and
do_statusbar_output(), do_statusbar_home(), need_statusbar_horizontal_update(); changes to
do_statusbar_end(), do_statusbar_right(), do_statusbar_left(), do_statusbar_mouse(), do_statusbar_output(),
do_statusbar_delete(), do_statusbar_cut_text(), do_statusbar_home(), do_statusbar_end(), do_statusbar_right(),
do_statusbar_next_word(), do_statusbar_prev_word(), do_statusbar_left(), do_statusbar_delete(),
do_statusbar_verbatim_input(), and nanogetstr(). (DLR) do_statusbar_cut_text(), do_statusbar_next_word(),
do_statusbar_prev_word(), do_statusbar_verbatim_input(),
nanoget_repaint() (renamed update_statusbar_line()),
nanogetstr() (renamed get_prompt_string()), statusq() (renamed
do_prompt()), statusq_abort() (renamed do_prompt_abort()), and
do_yesno() (renamed do_yesno_prompt()). (DLR)
- files.c: - files.c:
read_file() read_file()
- Remove apparently unneeded logic to handle a case where - Remove apparently unneeded logic to handle a case where
......
...@@ -246,7 +246,7 @@ char *do_browser(char *path, DIR *dir) ...@@ -246,7 +246,7 @@ char *do_browser(char *path, DIR *dir)
case 'g': case 'g':
curs_set(1); curs_set(1);
j = statusq(FALSE, gotodir_list, "", j = do_prompt(FALSE, gotodir_list, "",
#ifndef NANO_SMALL #ifndef NANO_SMALL
NULL, NULL,
#endif #endif
......
...@@ -670,7 +670,7 @@ void do_insertfile( ...@@ -670,7 +670,7 @@ void do_insertfile(
} }
#endif #endif
i = statusq(TRUE, i = do_prompt(TRUE,
#ifndef NANO_SMALL #ifndef NANO_SMALL
execute ? extcmd_list : execute ? extcmd_list :
#endif #endif
...@@ -730,7 +730,7 @@ void do_insertfile( ...@@ -730,7 +730,7 @@ void do_insertfile(
/* We have a file now. Indicate this and get out of the /* We have a file now. Indicate this and get out of the
* statusbar prompt cleanly. */ * statusbar prompt cleanly. */
i = 0; i = 0;
statusq_abort(); do_prompt_abort();
} }
#endif #endif
...@@ -1699,7 +1699,7 @@ int do_writeout(bool exiting) ...@@ -1699,7 +1699,7 @@ int do_writeout(bool exiting)
/* If we're using restricted mode, the filename isn't blank, /* If we're using restricted mode, the filename isn't blank,
* and we're at the "Write File" prompt, disable tab * and we're at the "Write File" prompt, disable tab
* completion. */ * completion. */
i = statusq(!ISSET(RESTRICTED) || i = do_prompt(!ISSET(RESTRICTED) ||
openfile->filename[0] == '\0', writefile_list, ans, openfile->filename[0] == '\0', writefile_list, ans,
#ifndef NANO_SMALL #ifndef NANO_SMALL
NULL, "%s%s%s", _(msg), formatstr, backupstr NULL, "%s%s%s", _(msg), formatstr, backupstr
...@@ -1729,7 +1729,7 @@ int do_writeout(bool exiting) ...@@ -1729,7 +1729,7 @@ int do_writeout(bool exiting)
/* We have a file now. Get out of the statusbar prompt /* We have a file now. Get out of the statusbar prompt
* cleanly. */ * cleanly. */
statusq_abort(); do_prompt_abort();
} else } else
#endif /* !DISABLE_BROWSER */ #endif /* !DISABLE_BROWSER */
#ifndef NANO_SMALL #ifndef NANO_SMALL
...@@ -1772,7 +1772,8 @@ int do_writeout(bool exiting) ...@@ -1772,7 +1772,8 @@ int do_writeout(bool exiting)
struct stat st; struct stat st;
if (!stat(answer, &st)) { if (!stat(answer, &st)) {
i = do_yesno(FALSE, _("File exists, OVERWRITE ? ")); i = do_yesno_prompt(FALSE,
_("File exists, OVERWRITE ? "));
if (i == 0 || i == -1) if (i == 0 || i == -1)
continue; continue;
/* If we're using restricted mode, we aren't allowed to /* If we're using restricted mode, we aren't allowed to
...@@ -1786,7 +1787,7 @@ int do_writeout(bool exiting) ...@@ -1786,7 +1787,7 @@ int do_writeout(bool exiting)
&& (exiting || !openfile->mark_set) && (exiting || !openfile->mark_set)
#endif #endif
) { ) {
i = do_yesno(FALSE, i = do_yesno_prompt(FALSE,
_("Save file under DIFFERENT NAME ? ")); _("Save file under DIFFERENT NAME ? "));
if (i == 0 || i == -1) if (i == 0 || i == -1)
continue; continue;
......
...@@ -905,11 +905,12 @@ void do_exit(void) ...@@ -905,11 +905,12 @@ void do_exit(void)
int i; int i;
if (!openfile->modified) if (!openfile->modified)
i = 0; /* Pretend the user chose not to save. */ /* Pretend the user chose not to save. */
i = 0;
else if (ISSET(TEMP_FILE)) else if (ISSET(TEMP_FILE))
i = 1; i = 1;
else else
i = do_yesno(FALSE, i = do_yesno_prompt(FALSE,
_("Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ")); _("Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "));
#ifdef DEBUG #ifdef DEBUG
......
...@@ -253,12 +253,16 @@ bool do_statusbar_mouse(void) ...@@ -253,12 +253,16 @@ bool do_statusbar_mouse(void)
/* Move to where the click occurred. */ /* Move to where the click occurred. */
if (mouse_x > start_col && mouse_y == 0) { if (mouse_x > start_col && mouse_y == 0) {
size_t pww_save = statusbar_pww;
statusbar_x = actual_x(answer, statusbar_x = actual_x(answer,
get_statusbar_page_start(start_col, start_col + get_statusbar_page_start(start_col, start_col +
statusbar_xplustabs()) + mouse_x - start_col - statusbar_xplustabs()) + mouse_x - start_col -
1); 1);
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/
if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
} }
} }
} }
...@@ -328,11 +332,13 @@ void do_statusbar_output(char *output, size_t output_len, bool ...@@ -328,11 +332,13 @@ void do_statusbar_output(char *output, size_t output_len, bool
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ update_statusbar_line(answer, statusbar_x);
} }
void do_statusbar_home(void) void do_statusbar_home(void)
{ {
size_t pww_save = statusbar_pww;
#ifndef NANO_SMALL #ifndef NANO_SMALL
if (ISSET(SMART_HOME)) { if (ISSET(SMART_HOME)) {
size_t statusbar_x_save = statusbar_x; size_t statusbar_x_save = statusbar_x;
...@@ -352,34 +358,44 @@ void do_statusbar_home(void) ...@@ -352,34 +358,44 @@ void do_statusbar_home(void)
} }
#endif #endif
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
} }
void do_statusbar_end(void) void do_statusbar_end(void)
{ {
size_t pww_save = statusbar_pww;
statusbar_x = strlen(answer); statusbar_x = strlen(answer);
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
} }
void do_statusbar_right(void) void do_statusbar_right(void)
{ {
if (statusbar_x < strlen(answer)) { if (statusbar_x < strlen(answer)) {
size_t pww_save = statusbar_pww;
statusbar_x = move_mbright(answer, statusbar_x); statusbar_x = move_mbright(answer, statusbar_x);
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
} }
} }
void do_statusbar_left(void) void do_statusbar_left(void)
{ {
if (statusbar_x > 0) { if (statusbar_x > 0) {
size_t pww_save = statusbar_pww;
statusbar_x = move_mbleft(answer, statusbar_x); statusbar_x = move_mbleft(answer, statusbar_x);
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
} }
} }
...@@ -407,6 +423,8 @@ void do_statusbar_delete(void) ...@@ -407,6 +423,8 @@ void do_statusbar_delete(void)
char_buf_len + 1); char_buf_len + 1);
null_at(&answer, statusbar_x + line_len - char_buf_len); null_at(&answer, statusbar_x + line_len - char_buf_len);
update_statusbar_line(answer, statusbar_x);
} }
} }
...@@ -427,7 +445,7 @@ void do_statusbar_cut_text(void) ...@@ -427,7 +445,7 @@ void do_statusbar_cut_text(void)
} }
#endif #endif
/*nanoget_repaint(answer, statusbar_x);*/ update_statusbar_line(answer, statusbar_x);
} }
#ifndef NANO_SMALL #ifndef NANO_SMALL
...@@ -436,6 +454,7 @@ void do_statusbar_cut_text(void) ...@@ -436,6 +454,7 @@ void do_statusbar_cut_text(void)
* on a word, and FALSE otherwise. */ * on a word, and FALSE otherwise. */
bool do_statusbar_next_word(bool allow_punct) bool do_statusbar_next_word(bool allow_punct)
{ {
size_t pww_save = statusbar_pww;
char *char_mb; char *char_mb;
int char_mb_len; int char_mb_len;
bool end_line = FALSE, started_on_word = FALSE; bool end_line = FALSE, started_on_word = FALSE;
...@@ -488,7 +507,8 @@ bool do_statusbar_next_word(bool allow_punct) ...@@ -488,7 +507,8 @@ bool do_statusbar_next_word(bool allow_punct)
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
/* Return whether we started on a word. */ /* Return whether we started on a word. */
return started_on_word; return started_on_word;
...@@ -499,6 +519,7 @@ bool do_statusbar_next_word(bool allow_punct) ...@@ -499,6 +519,7 @@ bool do_statusbar_next_word(bool allow_punct)
* on a word, and FALSE otherwise. */ * on a word, and FALSE otherwise. */
bool do_statusbar_prev_word(bool allow_punct) bool do_statusbar_prev_word(bool allow_punct)
{ {
size_t pww_save = statusbar_pww;
char *char_mb; char *char_mb;
int char_mb_len; int char_mb_len;
bool begin_line = FALSE, started_on_word = FALSE; bool begin_line = FALSE, started_on_word = FALSE;
...@@ -581,7 +602,8 @@ bool do_statusbar_prev_word(bool allow_punct) ...@@ -581,7 +602,8 @@ bool do_statusbar_prev_word(bool allow_punct)
statusbar_pww = statusbar_xplustabs(); statusbar_pww = statusbar_xplustabs();
/*nanoget_repaint(answer, statusbar_x);*/ if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
/* Return whether we started on a word. */ /* Return whether we started on a word. */
return started_on_word; return started_on_word;
...@@ -634,18 +656,20 @@ size_t get_statusbar_page_start(size_t start_col, size_t column) ...@@ -634,18 +656,20 @@ size_t get_statusbar_page_start(size_t start_col, size_t column)
start_col - 1); start_col - 1);
} }
/* Repaint the statusbar when getting a character in nanogetstr(). Note /* Repaint the statusbar when getting a character in
* that we must turn on A_REVERSE here, since do_help() turns it off! */ * get_prompt_string(). The statusbar text line will be displayed
void nanoget_repaint(const char *buf, size_t x) * starting with curranswer[index]. Assume the A_REVERSE attribute is
* turned off. */
void update_statusbar_line(const char *curranswer, size_t index)
{ {
size_t start_col, xpt, page_start; size_t start_col, page_start;
char *expanded; char *expanded;
assert(prompt != NULL && x <= strlen(buf)); assert(prompt != NULL && index <= strlen(buf));
start_col = strlenpt(prompt) + 1; start_col = strlenpt(prompt) + 1;
xpt = strnlenpt(buf, x); index = strnlenpt(curranswer, index);
page_start = get_statusbar_page_start(start_col, start_col + xpt); page_start = get_statusbar_page_start(start_col, start_col + index);
wattron(bottomwin, A_REVERSE); wattron(bottomwin, A_REVERSE);
...@@ -655,19 +679,40 @@ void nanoget_repaint(const char *buf, size_t x) ...@@ -655,19 +679,40 @@ void nanoget_repaint(const char *buf, size_t x)
waddch(bottomwin, ':'); waddch(bottomwin, ':');
waddch(bottomwin, (page_start == 0) ? ' ' : '$'); waddch(bottomwin, (page_start == 0) ? ' ' : '$');
expanded = display_string(buf, page_start, COLS - start_col - 1, expanded = display_string(curranswer, page_start, COLS - start_col -
FALSE); 1, FALSE);
waddstr(bottomwin, expanded); waddstr(bottomwin, expanded);
free(expanded); free(expanded);
wmove(bottomwin, 0, start_col + xpt + 1 - page_start); reset_statusbar_cursor();
wattroff(bottomwin, A_REVERSE); wattroff(bottomwin, A_REVERSE);
} }
/* Get the input from the keyboard. This should only be called from /* Put the cursor in the statusbar prompt at statusbar_x. */
* statusq(). */ void reset_statusbar_cursor(void)
int nanogetstr(bool allow_tabs, const char *curranswer, {
size_t start_col = strlenpt(prompt) + 1;
size_t page_start = get_statusbar_page_start(start_col,
start_col + statusbar_x);
wmove(bottomwin, 0, start_col + statusbar_x + 1 - page_start);
}
/* Return TRUE if we need an update after moving horizontally, and FALSE
* otherwise. We need one if old_pww and statusbar_pww are on different
* pages. */
bool need_statusbar_horizontal_update(size_t old_pww)
{
size_t start_col = strlenpt(prompt) + 1;
return get_statusbar_page_start(start_col, start_col + old_pww) !=
get_statusbar_page_start(start_col, start_col + statusbar_pww);
}
/* Get a string of input at the statusbar prompt. This should only be
* called from do_prompt(). */
int get_prompt_string(bool allow_tabs, const char *curranswer,
#ifndef NANO_SMALL #ifndef NANO_SMALL
filestruct **history_list, filestruct **history_list,
#endif #endif
...@@ -715,7 +760,7 @@ int nanogetstr(bool allow_tabs, const char *curranswer, ...@@ -715,7 +760,7 @@ int nanogetstr(bool allow_tabs, const char *curranswer,
currshortcut = s; currshortcut = s;
nanoget_repaint(answer, statusbar_x); update_statusbar_line(answer, statusbar_x);
/* Refresh the edit window and the statusbar before getting /* Refresh the edit window and the statusbar before getting
* input. */ * input. */
...@@ -824,8 +869,7 @@ int nanogetstr(bool allow_tabs, const char *curranswer, ...@@ -824,8 +869,7 @@ int nanogetstr(bool allow_tabs, const char *curranswer,
last_kbinput = kbinput; last_kbinput = kbinput;
#endif #endif
nanoget_repaint(answer, statusbar_x); reset_statusbar_cursor();
wnoutrefresh(bottomwin);
} }
#ifndef NANO_SMALL #ifndef NANO_SMALL
...@@ -850,15 +894,16 @@ int nanogetstr(bool allow_tabs, const char *curranswer, ...@@ -850,15 +894,16 @@ int nanogetstr(bool allow_tabs, const char *curranswer,
return kbinput; return kbinput;
} }
/* Ask a question on the statusbar. The prompt will be stored in /* Ask a question on the statusbar. The prompt will be stored in the
* the static prompt, which should be NULL initially, and the answer * static prompt, which should be NULL initially, and the answer will be
* will be stored in the answer global. Returns -1 on aborted enter, -2 * stored in the answer global. Returns -1 on aborted enter, -2 on a
* on a blank string, and 0 otherwise, the valid shortcut key caught. * blank string, and 0 otherwise, the valid shortcut key caught.
* curranswer is any editable text that we want to put up by default. * curranswer is any editable text that we want to put up by default.
* *
* The allow_tabs parameter indicates whether we should allow tabs to be * The allow_tabs parameter indicates whether we should allow tabs to be
* interpreted. */ * interpreted. */
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer, int do_prompt(bool allow_tabs, const shortcut *s, const char
*curranswer,
#ifndef NANO_SMALL #ifndef NANO_SMALL
filestruct **history_list, filestruct **history_list,
#endif #endif
...@@ -884,7 +929,7 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer, ...@@ -884,7 +929,7 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
va_end(ap); va_end(ap);
null_at(&prompt, actual_x(prompt, COLS - 4)); null_at(&prompt, actual_x(prompt, COLS - 4));
retval = nanogetstr(allow_tabs, curranswer, retval = get_prompt_string(allow_tabs, curranswer,
#ifndef NANO_SMALL #ifndef NANO_SMALL
history_list, history_list,
#endif #endif
...@@ -928,7 +973,10 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer, ...@@ -928,7 +973,10 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
return retval; return retval;
} }
void statusq_abort(void) /* This function forces a reset of the statusbar cursor position. It
* should only be called after do_prompt(), and is only needed if the
* user leaves the prompt via something other than Enter or Cancel. */
void do_prompt_abort(void)
{ {
reset_statusbar_x = TRUE; reset_statusbar_x = TRUE;
} }
...@@ -936,7 +984,7 @@ void statusq_abort(void) ...@@ -936,7 +984,7 @@ void statusq_abort(void)
/* Ask a simple Yes/No (and optionally All) question, specified in msg, /* Ask a simple Yes/No (and optionally All) question, specified in msg,
* on the statusbar. Return 1 for Yes, 0 for No, 2 for All (if all is * on the statusbar. Return 1 for Yes, 0 for No, 2 for All (if all is
* TRUE when passed in), and -1 for Cancel. */ * TRUE when passed in), and -1 for Cancel. */
int do_yesno(bool all, const char *msg) int do_yesno_prompt(bool all, const char *msg)
{ {
int ok = -2, width = 16; int ok = -2, width = 16;
const char *yesstr; /* String of Yes characters accepted. */ const char *yesstr; /* String of Yes characters accepted. */
......
...@@ -440,8 +440,10 @@ bool do_statusbar_prev_word(bool allow_punct); ...@@ -440,8 +440,10 @@ bool do_statusbar_prev_word(bool allow_punct);
void do_statusbar_verbatim_input(bool *got_enter); void do_statusbar_verbatim_input(bool *got_enter);
size_t statusbar_xplustabs(void); size_t statusbar_xplustabs(void);
size_t get_statusbar_page_start(size_t start_col, size_t column); size_t get_statusbar_page_start(size_t start_col, size_t column);
void nanoget_repaint(const char *buf, size_t x); void update_statusbar_line(const char *curranswer, size_t index);
int nanogetstr(bool allow_tabs, const char *curranswer, void reset_statusbar_cursor(void);
bool need_statusbar_horizontal_update(size_t old_pww);
int get_prompt_string(bool allow_tabs, const char *curranswer,
#ifndef NANO_SMALL #ifndef NANO_SMALL
filestruct **history_list, filestruct **history_list,
#endif #endif
...@@ -450,13 +452,14 @@ int nanogetstr(bool allow_tabs, const char *curranswer, ...@@ -450,13 +452,14 @@ int nanogetstr(bool allow_tabs, const char *curranswer,
, bool *list , bool *list
#endif #endif
); );
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer, int do_prompt(bool allow_tabs, const shortcut *s, const char
*curranswer,
#ifndef NANO_SMALL #ifndef NANO_SMALL
filestruct **history_list, filestruct **history_list,
#endif #endif
const char *msg, ...); const char *msg, ...);
void statusq_abort(void); void do_prompt_abort(void);
int do_yesno(bool all, const char *msg); int do_yesno_prompt(bool all, const char *msg);
/* Public functions in rcfile.c. */ /* Public functions in rcfile.c. */
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
......
...@@ -161,7 +161,7 @@ int search_init(bool replacing, bool use_answer) ...@@ -161,7 +161,7 @@ int search_init(bool replacing, bool use_answer)
buf = mallocstrcpy(NULL, ""); buf = mallocstrcpy(NULL, "");
/* This is now one simple call. It just does a lot. */ /* This is now one simple call. It just does a lot. */
i = statusq(FALSE, replacing ? replace_list : whereis_list, i = do_prompt(FALSE, replacing ? replace_list : whereis_list,
backupstring, backupstring,
#ifndef NANO_SMALL #ifndef NANO_SMALL
&search_history, &search_history,
...@@ -734,7 +734,7 @@ ssize_t do_replace_loop(const char *needle, const filestruct ...@@ -734,7 +734,7 @@ ssize_t do_replace_loop(const char *needle, const filestruct
do_replace_highlight(TRUE, exp_word); do_replace_highlight(TRUE, exp_word);
i = do_yesno(TRUE, _("Replace this instance?")); i = do_yesno_prompt(TRUE, _("Replace this instance?"));
do_replace_highlight(FALSE, exp_word); do_replace_highlight(FALSE, exp_word);
...@@ -892,7 +892,7 @@ void do_replace(void) ...@@ -892,7 +892,7 @@ void do_replace(void)
last_replace = mallocstrcpy(last_replace, ""); last_replace = mallocstrcpy(last_replace, "");
i = statusq(FALSE, replace_list_2, last_replace, i = do_prompt(FALSE, replace_list_2, last_replace,
#ifndef NANO_SMALL #ifndef NANO_SMALL
&replace_history, &replace_history,
#endif #endif
...@@ -953,7 +953,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer, ...@@ -953,7 +953,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
char *ans = mallocstrcpy(NULL, answer); char *ans = mallocstrcpy(NULL, answer);
/* Ask for it. */ /* Ask for it. */
int i = statusq(FALSE, gotoline_list, use_answer ? ans : "", int i = do_prompt(FALSE, gotoline_list, use_answer ? ans : "",
#ifndef NANO_SMALL #ifndef NANO_SMALL
NULL, NULL,
#endif #endif
......
...@@ -1564,7 +1564,7 @@ bool do_int_spell_fix(const char *word) ...@@ -1564,7 +1564,7 @@ bool do_int_spell_fix(const char *word)
do_replace_highlight(TRUE, exp_word); do_replace_highlight(TRUE, exp_word);
/* Allow all instances of the word to be corrected. */ /* Allow all instances of the word to be corrected. */
canceled = (statusq(FALSE, spell_list, word, canceled = (do_prompt(FALSE, spell_list, word,
#ifndef NANO_SMALL #ifndef NANO_SMALL
NULL, NULL,
#endif #endif
......
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