Mercurial > vim
changeset 2114:5a97d0c03b59 v7.2.397
updated for version 7.2.397
Problem: Redundant check for w_lines_valid.
Solution: Remove the if. (Lech Lorens)
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Wed, 17 Mar 2010 16:45:12 +0100 |
parents | 85ad19790706 |
children | 5fd44cf99b6d |
files | src/fold.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fold.c +++ b/src/fold.c @@ -1053,15 +1053,14 @@ find_wl_entry(win, lnum) { int i; - if (win->w_lines_valid > 0) - for (i = 0; i < win->w_lines_valid; ++i) - if (win->w_lines[i].wl_valid) - { - if (lnum < win->w_lines[i].wl_lnum) - return -1; - if (lnum <= win->w_lines[i].wl_lastlnum) - return i; - } + for (i = 0; i < win->w_lines_valid; ++i) + if (win->w_lines[i].wl_valid) + { + if (lnum < win->w_lines[i].wl_lnum) + return -1; + if (lnum <= win->w_lines[i].wl_lastlnum) + return i; + } return -1; }