summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0856
blob: 2b9d44b595fd1de863c152e7e4e4a7a9ae9b2a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0856
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0856
Problem:    When scrolling a window other than the current one the cursorline
            highlighting is not always updated. (Jason Franklin)
Solution:   Call redraw_for_cursorline() after scrolling.  Only set
            w_last_cursorline when drawing the cursor line.  Reset the lines
            to be redrawn also when redrawing the whole window.
Files:	    src/move.c, src/proto/move.pro, src/normal.c


*** ../vim-8.1.0855/src/move.c	2019-01-26 17:28:22.228599112 +0100
--- src/move.c	2019-01-31 13:12:23.092498619 +0100
***************
*** 19,25 ****
  
  #include "vim.h"
  
- static void redraw_for_cursorline(win_T *wp);
  static int scrolljump_value(void);
  static int check_top_offset(void);
  static void curs_rows(win_T *wp);
--- 19,24 ----
***************
*** 128,134 ****
   * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
   * set.
   */
!     static void
  redraw_for_cursorline(win_T *wp)
  {
      if ((wp->w_p_rnu
--- 127,133 ----
   * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
   * set.
   */
!     void
  redraw_for_cursorline(win_T *wp)
  {
      if ((wp->w_p_rnu
***************
*** 158,164 ****
  	    }
  	    else
  		redraw_win_later(wp, SOME_VALID);
- 	    wp->w_last_cursorline = wp->w_cursor.lnum;
  	}
  #endif
      }
--- 157,162 ----
*** ../vim-8.1.0855/src/proto/move.pro	2018-09-25 22:17:51.111962197 +0200
--- src/proto/move.pro	2019-01-31 13:12:25.920478058 +0100
***************
*** 1,5 ****
--- 1,6 ----
  /* move.c */
  void reset_cursorline(void);
+ void redraw_for_cursorline(win_T *wp);
  void update_topline_redraw(void);
  void update_topline(void);
  void update_curswant(void);
*** ../vim-8.1.0855/src/normal.c	2019-01-26 17:28:22.228599112 +0100
--- src/normal.c	2019-01-31 13:12:14.728559444 +0100
***************
*** 4587,4592 ****
--- 4587,4596 ----
  	}
      }
  # endif
+ # ifdef FEAT_SYN_HL
+     if (curwin != old_curwin && curwin->w_p_cul)
+ 	redraw_for_cursorline(curwin);
+ # endif
  
      curwin->w_redr_status = TRUE;
  
*** ../vim-8.1.0855/src/version.c	2019-01-31 11:00:38.767870492 +0100
--- src/version.c	2019-01-31 13:21:56.800716653 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     856,
  /**/

-- 
CONCORDE:  Quickly, sir, come this way!
LAUNCELOT: No!  It's not right for my idiom.  I must escape more  ... more ...
CONCORDE:  Dramatically, sir?
LAUNCELOT: Dramatically.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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    ///