|
21 | 21 |
|
22 | 22 | static void comp_botline __ARGS((win_T *wp)); |
23 | 23 | static void redraw_for_cursorline __ARGS((win_T *wp)); |
| 24 | +#ifdef FEAT_GUI_MACVIM |
| 25 | +static void redraw_for_ligatures __ARGS((win_T *wp)); |
| 26 | +#endif |
24 | 27 | static int scrolljump_value __ARGS((void)); |
25 | 28 | static int check_top_offset __ARGS((void)); |
26 | 29 | static void curs_rows __ARGS((win_T *wp)); |
@@ -107,6 +110,9 @@ comp_botline(wp) |
107 | 110 | wp->w_cline_folded = folded; |
108 | 111 | #endif |
109 | 112 | redraw_for_cursorline(wp); |
| 113 | +#ifdef FEATU_GUI_MACVIM |
| 114 | + redraw_for_ligatures(wp); |
| 115 | +#endif |
110 | 116 | wp->w_valid |= (VALID_CROW|VALID_CHEIGHT); |
111 | 117 | } |
112 | 118 | if (done + n > wp->w_height) |
@@ -145,6 +151,29 @@ redraw_for_cursorline(wp) |
145 | 151 | redraw_win_later(wp, SOME_VALID); |
146 | 152 | } |
147 | 153 |
|
| 154 | +#ifdef FEAT_GUI_MACVIM |
| 155 | +/* |
| 156 | + * Redraw when 'macliguters' is set. |
| 157 | + * This is basically the same as when 'cursorline' |
| 158 | + * or 'relativenumber' is set but unconditional. |
| 159 | + */ |
| 160 | +static void |
| 161 | +redraw_for_ligatures(wp) |
| 162 | + win_T *wp; |
| 163 | +{ |
| 164 | + /* Only if ligatures are on but neither |
| 165 | + * 'cursorline' nor 'relativenumber'. |
| 166 | + */ |
| 167 | + if (p_macligatures |
| 168 | + && (wp->w_p_rnu == 0 |
| 169 | +#ifdef FEAT_SYN_HL |
| 170 | + && wp->w_p_cul == 0 |
| 171 | +#endif |
| 172 | + )) |
| 173 | + redraw_win_later(wp, CLEAR); |
| 174 | +} |
| 175 | +#endif |
| 176 | + |
148 | 177 | /* |
149 | 178 | * Update curwin->w_topline and redraw if necessary. |
150 | 179 | * Used to update the screen before printing a message. |
@@ -793,6 +822,9 @@ curs_rows(wp) |
793 | 822 | } |
794 | 823 |
|
795 | 824 | redraw_for_cursorline(curwin); |
| 825 | +#ifdef FEAT_GUI_MACVIM |
| 826 | + redraw_for_ligatures(curwin); |
| 827 | +#endif |
796 | 828 | wp->w_valid |= VALID_CROW|VALID_CHEIGHT; |
797 | 829 |
|
798 | 830 | } |
|
0 commit comments