2014-07-31 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (do_insertfile): Adjust some indentation.
+ * src/prompt.c (do_statusbar_input), src/browser.c (do_browser):
+ Reorder a few things, and adjust some whitespace.
2014-07-27 Benno Schulenberg <bensberg@justemail.net>
* src/global.c (add_to_sclist): Remove the now unused and unneeded
} else if (func == do_up_void) {
if (selected >= width)
selected -= width;
- } else if (func == do_left) {
- if (selected > 0)
- selected--;
} else if (func == do_down_void) {
if (selected + width <= filelist_len - 1)
selected += width;
+ } else if (func == do_left) {
+ if (selected > 0)
+ selected--;
} else if (func == do_right) {
if (selected < filelist_len - 1)
selected++;
/* The maximum length of the file information in
* columns: seven for "--", "(dir)", or the file size,
* and 12 for "(parent dir)". */
- bool dots = (COLS >= 15 && filetaillen >= longest -
- foomaxlen - 1);
+ bool dots = (COLS >= 15 && filetaillen >= longest - foomaxlen - 1);
/* Do we put an ellipsis before the filename? Don't set
* this to TRUE if we have fewer than 15 columns (i.e.
* one column for padding, plus seven columns for a
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
'\0' || currmenu != MWRITEFILE)
do_statusbar_cut_text();
- } else if (s->scfunc == do_right)
- do_statusbar_right();
- else if (s->scfunc == do_left)
+ } else if (s->scfunc == do_left)
do_statusbar_left();
+ else if (s->scfunc == do_right)
+ do_statusbar_right();
#ifndef NANO_TINY
- else if (s->scfunc == do_next_word_void)
- do_statusbar_next_word(FALSE);
else if (s->scfunc == do_prev_word_void)
do_statusbar_prev_word(FALSE);
+ else if (s->scfunc == do_next_word_void)
+ do_statusbar_next_word(FALSE);
#endif
else if (s->scfunc == do_home)
do_statusbar_home();
statusbar_x = 0;
statusbar_pww = statusbar_xplustabs();
- } else {
+ } else
#endif
+ {
statusbar_x = 0;
statusbar_pww = statusbar_xplustabs();
-#ifndef NANO_TINY
}
-#endif
if (need_statusbar_horizontal_update(pww_save))
update_statusbar_line(answer, statusbar_x);
#ifndef NANO_TINY
if (ISSET(CUT_TO_END))
null_at(&answer, statusbar_x);
- else {
+ else
#endif
+ {
null_at(&answer, 0);
statusbar_x = 0;
statusbar_pww = statusbar_xplustabs();
-#ifndef NANO_TINY
}
-#endif
update_statusbar_line(answer, statusbar_x);
}
}
#ifdef DEBUG
-fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answer, (unsigned long) statusbar_x);
+ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answer, (unsigned long) statusbar_x);
#endif
update_statusbar_line(answer, statusbar_x);
wnoutrefresh(bottomwin);
}
-
#ifndef DISABLE_HISTORIES
/* Set the current position in the history list to the bottom,
* and free magichistory if we need to. */
}
#endif
-
/* We've finished putting in an answer or run a normal shortcut's
* associated function, so reset statusbar_x and statusbar_pww. If
* we've finished putting in an answer, reset the statusbar cursor