| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.458 |
| 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.4.458 |
| Problem: Issue 252: Cursor moves in a zero-height window. |
| Solution: Check for zero height. (idea by Christian Brabandt) |
| Files: src/move.c |
| |
| |
| |
| |
| |
| *** 183,188 **** |
| --- 183,200 ---- |
| if (!screen_valid(TRUE)) |
| return; |
| |
| + /* If the window height is zero just use the cursor line. */ |
| + if (curwin->w_height == 0) |
| + { |
| + curwin->w_topline = curwin->w_cursor.lnum; |
| + curwin->w_botline = curwin->w_topline; |
| + curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; |
| + #ifdef FEAT_SCROLLBIND |
| + curwin->w_scbind_pos = 1; |
| + #endif |
| + return; |
| + } |
| + |
| check_cursor_moved(curwin); |
| if (curwin->w_valid & VALID_TOPLINE) |
| return; |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 458, |
| /**/ |
| |
| -- |
| I'm so disorganized my keyboard isn't even in alphabetical order! |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |