Reordering a few things, and adjusting some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
fcd4468f90
commit
cf9f32b009
|
@ -1,5 +1,7 @@
|
||||||
2014-07-31 Benno Schulenberg <bensberg@justemail.net>
|
2014-07-31 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/files.c (do_insertfile): Adjust some indentation.
|
* 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>
|
2014-07-27 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/global.c (add_to_sclist): Remove the now unused and unneeded
|
* src/global.c (add_to_sclist): Remove the now unused and unneeded
|
||||||
|
|
|
@ -268,12 +268,12 @@ char *do_browser(char *path, DIR *dir)
|
||||||
} else if (func == do_up_void) {
|
} else if (func == do_up_void) {
|
||||||
if (selected >= width)
|
if (selected >= width)
|
||||||
selected -= width;
|
selected -= width;
|
||||||
} else if (func == do_left) {
|
|
||||||
if (selected > 0)
|
|
||||||
selected--;
|
|
||||||
} else if (func == do_down_void) {
|
} else if (func == do_down_void) {
|
||||||
if (selected + width <= filelist_len - 1)
|
if (selected + width <= filelist_len - 1)
|
||||||
selected += width;
|
selected += width;
|
||||||
|
} else if (func == do_left) {
|
||||||
|
if (selected > 0)
|
||||||
|
selected--;
|
||||||
} else if (func == do_right) {
|
} else if (func == do_right) {
|
||||||
if (selected < filelist_len - 1)
|
if (selected < filelist_len - 1)
|
||||||
selected++;
|
selected++;
|
||||||
|
@ -581,8 +581,7 @@ void browser_refresh(void)
|
||||||
/* The maximum length of the file information in
|
/* The maximum length of the file information in
|
||||||
* columns: seven for "--", "(dir)", or the file size,
|
* columns: seven for "--", "(dir)", or the file size,
|
||||||
* and 12 for "(parent dir)". */
|
* and 12 for "(parent dir)". */
|
||||||
bool dots = (COLS >= 15 && filetaillen >= longest -
|
bool dots = (COLS >= 15 && filetaillen >= longest - foomaxlen - 1);
|
||||||
foomaxlen - 1);
|
|
||||||
/* Do we put an ellipsis before the filename? Don't set
|
/* Do we put an ellipsis before the filename? Don't set
|
||||||
* this to TRUE if we have fewer than 15 columns (i.e.
|
* this to TRUE if we have fewer than 15 columns (i.e.
|
||||||
* one column for padding, plus seven columns for a
|
* one column for padding, plus seven columns for a
|
||||||
|
|
24
src/prompt.c
24
src/prompt.c
|
@ -151,15 +151,15 @@ int do_statusbar_input(bool *ran_func, bool *finished,
|
||||||
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
if (!ISSET(RESTRICTED) || openfile->filename[0] ==
|
||||||
'\0' || currmenu != MWRITEFILE)
|
'\0' || currmenu != MWRITEFILE)
|
||||||
do_statusbar_cut_text();
|
do_statusbar_cut_text();
|
||||||
} else if (s->scfunc == do_right)
|
} else if (s->scfunc == do_left)
|
||||||
do_statusbar_right();
|
|
||||||
else if (s->scfunc == do_left)
|
|
||||||
do_statusbar_left();
|
do_statusbar_left();
|
||||||
|
else if (s->scfunc == do_right)
|
||||||
|
do_statusbar_right();
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
else if (s->scfunc == do_next_word_void)
|
|
||||||
do_statusbar_next_word(FALSE);
|
|
||||||
else if (s->scfunc == do_prev_word_void)
|
else if (s->scfunc == do_prev_word_void)
|
||||||
do_statusbar_prev_word(FALSE);
|
do_statusbar_prev_word(FALSE);
|
||||||
|
else if (s->scfunc == do_next_word_void)
|
||||||
|
do_statusbar_next_word(FALSE);
|
||||||
#endif
|
#endif
|
||||||
else if (s->scfunc == do_home)
|
else if (s->scfunc == do_home)
|
||||||
do_statusbar_home();
|
do_statusbar_home();
|
||||||
|
@ -340,13 +340,12 @@ void do_statusbar_home(void)
|
||||||
statusbar_x = 0;
|
statusbar_x = 0;
|
||||||
|
|
||||||
statusbar_pww = statusbar_xplustabs();
|
statusbar_pww = statusbar_xplustabs();
|
||||||
} else {
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
statusbar_x = 0;
|
statusbar_x = 0;
|
||||||
statusbar_pww = statusbar_xplustabs();
|
statusbar_pww = statusbar_xplustabs();
|
||||||
#ifndef NANO_TINY
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (need_statusbar_horizontal_update(pww_save))
|
if (need_statusbar_horizontal_update(pww_save))
|
||||||
update_statusbar_line(answer, statusbar_x);
|
update_statusbar_line(answer, statusbar_x);
|
||||||
|
@ -431,14 +430,13 @@ void do_statusbar_cut_text(void)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (ISSET(CUT_TO_END))
|
if (ISSET(CUT_TO_END))
|
||||||
null_at(&answer, statusbar_x);
|
null_at(&answer, statusbar_x);
|
||||||
else {
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
null_at(&answer, 0);
|
null_at(&answer, 0);
|
||||||
statusbar_x = 0;
|
statusbar_x = 0;
|
||||||
statusbar_pww = statusbar_xplustabs();
|
statusbar_pww = statusbar_xplustabs();
|
||||||
#ifndef NANO_TINY
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
update_statusbar_line(answer, statusbar_x);
|
update_statusbar_line(answer, statusbar_x);
|
||||||
}
|
}
|
||||||
|
@ -777,7 +775,7 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#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
|
#endif
|
||||||
|
|
||||||
update_statusbar_line(answer, statusbar_x);
|
update_statusbar_line(answer, statusbar_x);
|
||||||
|
@ -901,7 +899,6 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
|
||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
/* Set the current position in the history list to the bottom,
|
/* Set the current position in the history list to the bottom,
|
||||||
* and free magichistory if we need to. */
|
* and free magichistory if we need to. */
|
||||||
|
@ -913,7 +910,6 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* We've finished putting in an answer or run a normal shortcut's
|
/* We've finished putting in an answer or run a normal shortcut's
|
||||||
* associated function, so reset statusbar_x and statusbar_pww. If
|
* associated function, so reset statusbar_x and statusbar_pww. If
|
||||||
* we've finished putting in an answer, reset the statusbar cursor
|
* we've finished putting in an answer, reset the statusbar cursor
|
||||||
|
|
Loading…
Reference in New Issue