| To: vim-dev@vim.org |
| Subject: Patch 7.2.397 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.2.397 |
| Problem: Redundant check for w_lines_valid. |
| Solution: Remove the if. (Lech Lorens) |
| Files: src/fold.c |
| |
| |
| |
| |
| |
| *** 1053,1067 **** |
| { |
| 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; |
| ! } |
| return -1; |
| } |
| |
| --- 1053,1066 ---- |
| { |
| int 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; |
| } |
| |
| |
| |
| |
| *** 683,684 **** |
| --- 683,686 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 397, |
| /**/ |
| |
| -- |
| Did you ever stop to think... and forget to start again? |
| -- Steven Wright |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |