do_output()
- Properly allow wrapping when we insert a tab, for consistency.
(DLR)
+- search.c:
+ get_history_newer()
+ - Remove redundant check. (DLR)
- utils.c:
num_of_digits()
- Use a size_t instead of an int, and rename to digits(). (DLR)
{
if (h->current->prev != NULL) {
h->current = h->current->prev;
- if (h->current->prev != NULL)
- return h->current->data;
+ return h->current->data;
}
return NULL;
}
char *complete = NULL;
int last_kbinput = 0;
- /* This variable is used in the search history code. use_cb == 0
- means that we're using the existing history and ignoring
- currentbuf. use_cb == 1 means that the entry in answer should be
- moved to currentbuf or restored from currentbuf to answer.
- use_cb == 2 means that the entry in currentbuf should be moved to
- answer or restored from answer to currentbuf. */
+ /* This variable is used in the search history code. use_cb == 0
+ * means that we're using the existing history and ignoring
+ * currentbuf. use_cb == 1 means that the entry in answer should be
+ * moved to currentbuf or restored from currentbuf to answer.
+ * use_cb == 2 means that the entry in currentbuf should be moved to
+ * answer or restored from answer to currentbuf. */
int use_cb = 0;
#endif
nanoget_repaint(buf, answer, statusbar_x);
- /* Refresh the edit window before getting input. */
+ /* Refresh the edit window and the statusbar before getting
+ * input. */
wnoutrefresh(edit);
wrefresh(bottomwin);
free(currentbuf);
currentbuf = NULL;
use_cb = 1;
- /* Itherwise, if currentbuf is NULL and use_cb isn't
+ /* Otherwise, if currentbuf is NULL and use_cb isn't
* 2, it means that we're scrolling down at the
* bottom of the search history and the current
* answer (if it's not blank) needs to be saved in