Reordering a few things, and adjusting some whitespace.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-07-31 20:49:32 +00:00
parent fcd4468f90
commit cf9f32b009
3 changed files with 16 additions and 19 deletions

View File

@ -1,5 +1,7 @@
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

View File

@ -268,12 +268,12 @@ char *do_browser(char *path, DIR *dir)
} 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++;
@ -581,8 +581,7 @@ void browser_refresh(void)
/* 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

View File

@ -151,15 +151,15 @@ int do_statusbar_input(bool *ran_func, bool *finished,
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();
@ -340,13 +340,12 @@ void do_statusbar_home(void)
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);
@ -431,14 +430,13 @@ void do_statusbar_cut_text(void)
#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);
}
@ -901,7 +899,6 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
wnoutrefresh(bottomwin);
}
#ifndef DISABLE_HISTORIES
/* Set the current position in the history list to the bottom,
* and free magichistory if we need to. */
@ -913,7 +910,6 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
}
#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