|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.226
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.226 (after 7.4.219)
|
|
|
22c937 |
Problem: Cursurline highlighting not redrawn when scrolling. (John
|
|
|
22c937 |
Marriott)
|
|
|
22c937 |
Solution: Check for required redraw in two places.
|
|
|
22c937 |
Files: src/move.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.225/src/move.c 2014-03-27 12:11:43.888393741 +0100
|
|
|
22c937 |
--- src/move.c 2014-03-28 21:45:56.958245561 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 20,25 ****
|
|
|
22c937 |
--- 20,26 ----
|
|
|
22c937 |
#include "vim.h"
|
|
|
22c937 |
|
|
|
22c937 |
static void comp_botline __ARGS((win_T *wp));
|
|
|
22c937 |
+ static void redraw_for_cursorline __ARGS((win_T *wp));
|
|
|
22c937 |
static int scrolljump_value __ARGS((void));
|
|
|
22c937 |
static int check_top_offset __ARGS((void));
|
|
|
22c937 |
static void curs_rows __ARGS((win_T *wp, int do_botline));
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 106,111 ****
|
|
|
22c937 |
--- 107,113 ----
|
|
|
22c937 |
#ifdef FEAT_FOLDING
|
|
|
22c937 |
wp->w_cline_folded = folded;
|
|
|
22c937 |
#endif
|
|
|
22c937 |
+ redraw_for_cursorline(wp);
|
|
|
22c937 |
wp->w_valid |= (VALID_CROW|VALID_CHEIGHT);
|
|
|
22c937 |
}
|
|
|
22c937 |
if (done + n > wp->w_height)
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 124,129 ****
|
|
|
22c937 |
--- 126,152 ----
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
/*
|
|
|
22c937 |
+ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
|
|
|
22c937 |
+ * set.
|
|
|
22c937 |
+ */
|
|
|
22c937 |
+ static void
|
|
|
22c937 |
+ redraw_for_cursorline(wp)
|
|
|
22c937 |
+ win_T *wp;
|
|
|
22c937 |
+ {
|
|
|
22c937 |
+ if ((wp->w_p_rnu
|
|
|
22c937 |
+ #ifdef FEAT_SYN_HL
|
|
|
22c937 |
+ || wp->w_p_cul
|
|
|
22c937 |
+ #endif
|
|
|
22c937 |
+ )
|
|
|
22c937 |
+ && (wp->w_valid & VALID_CROW) == 0
|
|
|
22c937 |
+ # ifdef FEAT_INS_EXPAND
|
|
|
22c937 |
+ && !pum_visible()
|
|
|
22c937 |
+ # endif
|
|
|
22c937 |
+ )
|
|
|
22c937 |
+ redraw_win_later(wp, SOME_VALID);
|
|
|
22c937 |
+ }
|
|
|
22c937 |
+
|
|
|
22c937 |
+ /*
|
|
|
22c937 |
* Update curwin->w_topline and redraw if necessary.
|
|
|
22c937 |
* Used to update the screen before printing a message.
|
|
|
22c937 |
*/
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 772,791 ****
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
! /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
|
|
|
22c937 |
! * set. */
|
|
|
22c937 |
! if ((curwin->w_p_rnu
|
|
|
22c937 |
! #ifdef FEAT_SYN_HL
|
|
|
22c937 |
! || curwin->w_p_cul
|
|
|
22c937 |
! #endif
|
|
|
22c937 |
! )
|
|
|
22c937 |
! && (curwin->w_valid & VALID_CROW) == 0
|
|
|
22c937 |
! # ifdef FEAT_INS_EXPAND
|
|
|
22c937 |
! && !pum_visible()
|
|
|
22c937 |
! # endif
|
|
|
22c937 |
! )
|
|
|
22c937 |
! redraw_later(SOME_VALID);
|
|
|
22c937 |
!
|
|
|
22c937 |
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
|
|
|
22c937 |
|
|
|
22c937 |
/* validate botline too, if update_screen doesn't do it */
|
|
|
22c937 |
--- 795,801 ----
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
! redraw_for_cursorline(curwin);
|
|
|
22c937 |
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
|
|
|
22c937 |
|
|
|
22c937 |
/* validate botline too, if update_screen doesn't do it */
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 2504,2511 ****
|
|
|
22c937 |
}
|
|
|
22c937 |
comp_botline(curwin);
|
|
|
22c937 |
curwin->w_cursor.lnum = curwin->w_botline - 1;
|
|
|
22c937 |
! curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|
|
|
|
22c937 |
! VALID_WROW|VALID_CROW);
|
|
|
22c937 |
}
|
|
|
22c937 |
else
|
|
|
22c937 |
{
|
|
|
22c937 |
--- 2514,2521 ----
|
|
|
22c937 |
}
|
|
|
22c937 |
comp_botline(curwin);
|
|
|
22c937 |
curwin->w_cursor.lnum = curwin->w_botline - 1;
|
|
|
22c937 |
! curwin->w_valid &=
|
|
|
22c937 |
! ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW);
|
|
|
22c937 |
}
|
|
|
22c937 |
else
|
|
|
22c937 |
{
|
|
|
22c937 |
*** ../vim-7.4.225/src/version.c 2014-03-27 19:08:52.008777244 +0100
|
|
|
22c937 |
--- src/version.c 2014-03-28 21:48:45.330248141 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 736,737 ****
|
|
|
22c937 |
--- 736,739 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 226,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
Bad fashion can discourage normal people from interacting with the engineer
|
|
|
22c937 |
and talking about the cute things their children do.
|
|
|
22c937 |
(Scott Adams - The Dilbert principle)
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|