do_writeout_void()
- Call display_main_list(), for consistency with
do_insertfile_void(). (DLR)
+ write_marked()
+ - Remove check for MARK_ISSET's not being set. (DLR)
open_prevfile(), open_nextfile()
- Translate the "New Buffer" string when displaying "Switched
to" messages on the statusbar. (DLR)
wholewords, not after all other parameters. (DLR)
- Maintain current_y's value when moving up or down lines so
that smooth scrolling works correctly. (DLR)
-- utils.c:
- mark_order()
- - Add check for MARK_ISSET's not being set. (DLR)
- winio.c:
unget_kbinput()
- New function used as a wrapper for ungetch(). (DLR)
do_replace_highlight(TRUE, word);
- /* Allow the replace word to be corrected. */
- accepted = -1 != statusq(FALSE, spell_list, word,
+ /* Allow all instances of the word to be corrected. */
+ accepted = (statusq(FALSE, spell_list, word,
#ifndef NANO_SMALL
NULL,
#endif
- _("Edit a replacement"));
+ _("Edit a replacement")) != -1);
do_replace_highlight(FALSE, word);
}
/* Look for needle, starting at current, column current_x. If
- * no_sameline is nonzero, skip over begin when looking for needle.
- * begin is the line where we first started searching, at column beginx.
- * If can_display_wrap is nonzero, we put messages on the statusbar, and
- * wrap around the file boundaries. The return value specifies whether
- * we found anything. */
+ * no_sameline is TRUE, skip over begin when looking for needle. begin
+ * is the line where we first started searching, at column beginx. If
+ * can_display_wrap is TRUE, we put messages on the statusbar, and wrap
+ * around the file boundaries. The return value specifies whether we
+ * found anything. */
bool findnextstr(bool can_display_wrap, bool wholeword, bool
no_sameline, const filestruct *begin, size_t beginx, const char
*needle)
* will return immediately and say that no match was found, and
* rev_start will be properly set when the search continues on the
* previous or next line. */
+ rev_start =
#ifndef NANO_SMALL
- if (ISSET(REVERSE_SEARCH))
- rev_start = fileptr->data + (current_x - 1);
- else
+ ISSET(REVERSE_SEARCH) ? fileptr->data + (current_x - 1) :
#endif
- rev_start = fileptr->data + (current_x + 1);
+ fileptr->data + (current_x + 1);
/* Look for needle in searchstr. */
while (TRUE) {
if (search_last_line) {
if (can_display_wrap)
not_found_msg(needle);
- return 0;
+ return FALSE;
}
#ifndef NANO_SMALL
/* Start or end of buffer reached; wrap around. */
if (fileptr == NULL) {
if (!can_display_wrap)
- return 0;
+ return FALSE;
#ifndef NANO_SMALL
if (ISSET(REVERSE_SEARCH)) {
if (can_display_wrap)
not_found_msg(needle);
- return 0;
+ return FALSE;
}
/* Set globals now that we are sure we found something. */
current_x = current_x_find;
current_y = current_y_find;
- return 1;
+ return TRUE;
}
/* Search for a string. */
/* If we've found a match outside the marked text, skip over it
* and search for another one. */
if (old_mark_set) {
- if (current->lineno < top->lineno
- || current->lineno > bot->lineno
- || (current == top && current_x < top_x)
- || (current == bot && (current_x > bot_x ||
- current_x + match_len > bot_x)))
+ if (current->lineno < top->lineno || current->lineno >
+ bot->lineno || (current == top && current_x < top_x) ||
+ (current == bot && (current_x > bot_x || current_x +
+ match_len > bot_x)))
continue;
}
#endif