mirror of git://git.sv.gnu.org/nano.git
in browser_refresh() and titlebar(), don't display overly long filenames
with ellipses if the number of columns is extremely small; also, in certain places, call wnoutrefresh(bottomwin) after calling blank_statusbar(), in order to ensure that the statusbar is actually blanked git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
0cae087784
commit
51b7b0e7d8
10
ChangeLog
10
ChangeLog
|
@ -9,6 +9,11 @@ CVS code -
|
|||
- Fix mouse support so that it truly ignores everything except
|
||||
releases and clicks of button 1. Changes to
|
||||
enable_mouse_support() and get_mouseinput(). (DLR)
|
||||
- In certain places, call wnoutrefresh(bottomwin) after calling
|
||||
blank_statusbar(), in order to ensure that the statusbar is
|
||||
actually blanked. Changes to do_help(), do_continue(),
|
||||
handle_sigwinch(), and update_statusbar_line(). (DLR)
|
||||
(DLR)
|
||||
- browser.c:
|
||||
do_browser()
|
||||
- Refactor the mouse support, modeling it after do_mouse() for
|
||||
|
@ -38,6 +43,8 @@ CVS code -
|
|||
lengths of "(dir)" and "(parent dir)". (DLR)
|
||||
- Fix problem where width wouldn't be properly initialized if
|
||||
the file list took up one line or less. (DLR)
|
||||
- Don't display overly long filenames with ellipses if the
|
||||
number of columns is extremely small. (DLR)
|
||||
browser_select_filename()
|
||||
- New function, used to select a specific filename in the list.
|
||||
(DLR)
|
||||
|
@ -55,6 +62,9 @@ CVS code -
|
|||
display_string()
|
||||
- Properly handle buf[start_index]'s being a null terminator.
|
||||
(DLR)
|
||||
titlebar()
|
||||
- Don't display overly long filenames with ellipses if the
|
||||
number of columns is extremely small. (DLR)
|
||||
- doc/syntax/c.nanorc:
|
||||
- Since .i and .ii are preprocessed C and C++ output, colorize
|
||||
them here. (Mike Frysinger)
|
||||
|
|
|
@ -616,9 +616,10 @@ void browser_refresh(void)
|
|||
/* The maximum length of the file information in
|
||||
* columns: 7 for "--", "(dir)", or the file size, and
|
||||
* 12 for "(parent dir)". */
|
||||
bool dots = (COLS < 15 ? FALSE : filetaillen > longest -
|
||||
bool dots = (COLS >= 15 && filetaillen > longest -
|
||||
foomaxlen - 1);
|
||||
/* Do we put an ellipsis before the filename? */
|
||||
/* Do we put an ellipsis before the filename? Don't set
|
||||
* this to TRUE if we have fewer than 15 columns. */
|
||||
char *disp = display_string(filetail, dots ? filetaillen -
|
||||
longest + foomaxlen + 4 : 0, longest, FALSE);
|
||||
/* If we put an ellipsis before the filename, reserve 1
|
||||
|
|
|
@ -79,6 +79,7 @@ void do_help(void (*refresh_func)(void))
|
|||
}
|
||||
|
||||
bottombars(help_list);
|
||||
wnoutrefresh(bottomwin);
|
||||
|
||||
/* Get the last line of the help text. */
|
||||
ptr = help_text;
|
||||
|
|
|
@ -1056,6 +1056,7 @@ RETSIGTYPE do_continue(int signal)
|
|||
|
||||
/* Redraw the contents of the windows that need it. */
|
||||
blank_statusbar();
|
||||
wnoutrefresh(bottomwin);
|
||||
total_refresh();
|
||||
#endif
|
||||
}
|
||||
|
@ -1116,6 +1117,7 @@ RETSIGTYPE handle_sigwinch(int signal)
|
|||
|
||||
/* Redraw the contents of the windows that need it. */
|
||||
blank_statusbar();
|
||||
wnoutrefresh(bottomwin);
|
||||
currshortcut = main_list;
|
||||
total_refresh();
|
||||
|
||||
|
|
|
@ -902,6 +902,8 @@ void update_statusbar_line(const char *curranswer, size_t index)
|
|||
reset_statusbar_cursor();
|
||||
|
||||
wattroff(bottomwin, reverse_attr);
|
||||
|
||||
wnoutrefresh(bottomwin);
|
||||
}
|
||||
|
||||
/* Return TRUE if we need an update after moving horizontally, and FALSE
|
||||
|
|
|
@ -2051,7 +2051,9 @@ void titlebar(const char *path)
|
|||
if (!newfie) {
|
||||
size_t lenpt = strlenpt(path), start_col;
|
||||
|
||||
dots = (lenpt >= space);
|
||||
/* Don't set dots to TRUE if we have at least 1/3 the length of
|
||||
* the screen in columns, minus two columns for spaces. */
|
||||
dots = (space >= (COLS / 3) - 2 && lenpt >= space);
|
||||
|
||||
if (dots) {
|
||||
start_col = lenpt - space + 3;
|
||||
|
@ -2941,6 +2943,7 @@ void edit_refresh(void)
|
|||
blank_line(edit, nlines, 0, COLS);
|
||||
|
||||
reset_cursor();
|
||||
|
||||
wnoutrefresh(edit);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue