comparison src/option.c @ 10456:536a7d49249c v8.0.0121

commit https://github.com/vim/vim/commit/a2477fd3490c1166522631eee53c57d34321086a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 3 15:13:20 2016 +0100 patch 8.0.0121 Problem: Setting 'cursorline' changes the curswant column. (Daniel Hahler) Solution: Add the P_RWINONLY flag. (closes https://github.com/vim/vim/issues/1297)
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Dec 2016 15:15:03 +0100
parents bc97f64c21c2
children 688b97124d23
comparison
equal deleted inserted replaced
10455:e7cbe2896bfe 10456:536a7d49249c
433 #define P_VI_DEF 0x400 /* Use Vi default for Vim */ 433 #define P_VI_DEF 0x400 /* Use Vi default for Vim */
434 #define P_VIM 0x800 /* Vim option, reset when 'cp' set */ 434 #define P_VIM 0x800 /* Vim option, reset when 'cp' set */
435 435
436 /* when option changed, what to display: */ 436 /* when option changed, what to display: */
437 #define P_RSTAT 0x1000 /* redraw status lines */ 437 #define P_RSTAT 0x1000 /* redraw status lines */
438 #define P_RWIN 0x2000 /* redraw current window */ 438 #define P_RWIN 0x2000 /* redraw current window and recompute text */
439 #define P_RBUF 0x4000 /* redraw current buffer */ 439 #define P_RBUF 0x4000 /* redraw current buffer and recompute text */
440 #define P_RALL 0x6000 /* redraw all windows */ 440 #define P_RALL 0x6000 /* redraw all windows */
441 #define P_RCLR 0x7000 /* clear and redraw all */ 441 #define P_RCLR 0x7000 /* clear and redraw all */
442 442
443 #define P_COMMA 0x8000 /* comma separated list */ 443 #define P_COMMA 0x8000 /* comma separated list */
444 #define P_ONECOMMA 0x18000L /* P_COMMA and cannot have two consecutive 444 #define P_ONECOMMA 0x18000L /* P_COMMA and cannot have two consecutive
455 side effects) */ 455 side effects) */
456 #define P_NO_ML 0x2000000L /* not allowed in modeline */ 456 #define P_NO_ML 0x2000000L /* not allowed in modeline */
457 #define P_CURSWANT 0x4000000L /* update curswant required; not needed when 457 #define P_CURSWANT 0x4000000L /* update curswant required; not needed when
458 * there is a redraw flag */ 458 * there is a redraw flag */
459 #define P_NDNAME 0x8000000L /* only normal dir name chars allowed */ 459 #define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
460 #define P_RWINONLY 0x10000000L /* only redraw current window */
460 461
461 #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255" 462 #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
462 463
463 /* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used 464 /* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used
464 * for the currency sign. */ 465 * for the currency sign. */
965 (char_u *)VAR_WIN, PV_CUC, 966 (char_u *)VAR_WIN, PV_CUC,
966 #else 967 #else
967 (char_u *)NULL, PV_NONE, 968 (char_u *)NULL, PV_NONE,
968 #endif 969 #endif
969 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 970 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
970 {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN, 971 {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
971 #ifdef FEAT_SYN_HL 972 #ifdef FEAT_SYN_HL
972 (char_u *)VAR_WIN, PV_CUL, 973 (char_u *)VAR_WIN, PV_CUL,
973 #else 974 #else
974 (char_u *)NULL, PV_NONE, 975 (char_u *)NULL, PV_NONE,
975 #endif 976 #endif
9053 9054
9054 if ((flags & P_RBUF) || (flags & P_RWIN) || all) 9055 if ((flags & P_RBUF) || (flags & P_RWIN) || all)
9055 changed_window_setting(); 9056 changed_window_setting();
9056 if (flags & P_RBUF) 9057 if (flags & P_RBUF)
9057 redraw_curbuf_later(NOT_VALID); 9058 redraw_curbuf_later(NOT_VALID);
9059 if (flags & P_RWINONLY)
9060 redraw_later(NOT_VALID);
9058 if (doclear) 9061 if (doclear)
9059 redraw_all_later(CLEAR); 9062 redraw_all_later(CLEAR);
9060 else if (all) 9063 else if (all)
9061 redraw_all_later(NOT_VALID); 9064 redraw_all_later(NOT_VALID);
9062 } 9065 }