Mercurial > vim
comparison src/main.c @ 18068:1101eacc1444 v8.1.2029
patch 8.1.2029: cannot control 'cursorline' highlighting well
Commit: https://github.com/vim/vim/commit/017ba07fa2cdc578245618717229444fd50c470d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 14 21:01:23 2019 +0200
patch 8.1.2029: cannot control 'cursorline' highlighting well
Problem: Cannot control 'cursorline' highlighting well.
Solution: Add "screenline". (Christian Brabandt, closes https://github.com/vim/vim/issues/4933)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 14 Sep 2019 21:15:04 +0200 |
parents | af0b4ffab794 |
children | a2870e6f5b45 |
comparison
equal
deleted
inserted
replaced
18067:9e20b59dd8ab | 18068:1101eacc1444 |
---|---|
1253 * if lines don't wrap, and w_skipcol if lines wrap. | 1253 * if lines don't wrap, and w_skipcol if lines wrap. |
1254 */ | 1254 */ |
1255 update_topline(); | 1255 update_topline(); |
1256 validate_cursor(); | 1256 validate_cursor(); |
1257 | 1257 |
1258 #ifdef FEAT_SYN_HL | |
1259 if (curwin->w_p_cul && curwin->w_p_wrap | |
1260 && (curwin->w_p_culopt_flags & CULOPT_SCRLINE)) | |
1261 must_redraw = NOT_VALID; | |
1262 #endif | |
1263 | |
1258 if (VIsual_active) | 1264 if (VIsual_active) |
1259 update_curbuf(INVERTED);/* update inverted part */ | 1265 update_curbuf(INVERTED); // update inverted part |
1260 else if (must_redraw) | 1266 else if (must_redraw) |
1261 { | 1267 { |
1262 mch_disable_flush(); /* Stop issuing gui_mch_flush(). */ | 1268 mch_disable_flush(); // Stop issuing gui_mch_flush(). |
1263 update_screen(0); | 1269 #ifdef FEAT_SYN_HL |
1270 // Might need some more update for the cursorscreen line. | |
1271 // TODO: can we optimize this? | |
1272 if (curwin->w_p_cul | |
1273 && curwin->w_p_wrap | |
1274 && (curwin->w_p_culopt_flags & CULOPT_SCRLINE) | |
1275 && !char_avail()) | |
1276 update_screen(VALID); | |
1277 else | |
1278 #endif | |
1279 update_screen(0); | |
1264 mch_enable_flush(); | 1280 mch_enable_flush(); |
1265 } | 1281 } |
1266 else if (redraw_cmdline || clear_cmdline) | 1282 else if (redraw_cmdline || clear_cmdline) |
1267 showmode(); | 1283 showmode(); |
1268 redraw_statuslines(); | 1284 redraw_statuslines(); |