nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit b0c1bc28f81147e12e7bae317cce772b62ce42a9
parent 0e92adf153801067ffa9ac360f26af7048bf18c8
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Thu, 29 Jun 2006 15:46:05 +0000

in browser_refresh(), simplify more things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 2+-
Msrc/browser.c | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -14,7 +14,7 @@ CVS code - do_mouse() for consistency. (DLR) - Remove unneeded call to blank_edit(). (DLR) browser_refresh() - - Simplify the for loop. (DLR) + - Simplify. (DLR) - doc/syntax/c.nanorc: - Since .i and .ii are preprocessed C and C++ output, colorize them here. (Mike Frysinger) diff --git a/src/browser.c b/src/browser.c @@ -522,18 +522,18 @@ void parse_browser_input(int *kbinput, bool *meta_key, bool *func_key) void browser_refresh(void) { struct stat st; - size_t i = 0; + size_t i; int col = 0, line = 0, filecols = 0; size_t foo_len = mb_cur_max() * 7; char *foo = charalloc(foo_len + 1); - if (width != 0) - i = width * editwinrows * ((selected / width) / editwinrows); - blank_edit(); wmove(edit, 0, 0); + i = (width != 0) ? width * editwinrows * ((selected / width) / + editwinrows) : 0; + for (; i < filelist_len && line < editwinrows; i++) { char *disp = display_string(tail(filelist[i]), 0, longest, FALSE);