File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -873,18 +873,13 @@ apply_general_options(win_T *wp, dict_T *dict)
873873 handle_moved_argument (wp , di , TRUE);
874874 }
875875
876- di = dict_find (dict , (char_u * )"cursorline" , -1 );
877- if (di != NULL )
876+ nr = dict_get_bool (dict , (char_u * )"cursorline" , -1 );
877+ if (nr != -1 )
878878 {
879- if (di -> di_tv .v_type == VAR_NUMBER )
880- {
881- if (di -> di_tv .vval .v_number != 0 )
882- wp -> w_popup_flags |= POPF_CURSORLINE ;
883- else
884- wp -> w_popup_flags &= ~POPF_CURSORLINE ;
885- }
879+ if (nr != 0 )
880+ wp -> w_popup_flags |= POPF_CURSORLINE ;
886881 else
887- semsg ( _ ( e_invargval ), "cursorline" ) ;
882+ wp -> w_popup_flags &= ~ POPF_CURSORLINE ;
888883 }
889884
890885 di = dict_find (dict , (char_u * )"filter" , -1 );
Original file line number Diff line number Diff line change @@ -2978,6 +2978,10 @@ func Test_popup_cursorline()
29782978 call assert_equal (1 , popup_getoptions (winid).cursorline )
29792979 call popup_close (winid)
29802980
2981+ let winid = popup_create (' some text' , #{ cursorline : v: true , })
2982+ call assert_equal (1 , popup_getoptions (winid).cursorline )
2983+ call popup_close (winid)
2984+
29812985 let winid = popup_create (' some text' , #{ cursorline : 0 , })
29822986 call assert_equal (0 , popup_getoptions (winid).cursorline )
29832987 call popup_close (winid)
@@ -3112,6 +3116,15 @@ func Test_popup_cursorline()
31123116 call delete (' XtestPopupCursorLine' )
31133117endfunc
31143118
3119+ def Test_popup_cursorline_vim9 ()
3120+ var winid = popup_create (' some text' , { cursorline : true, })
3121+ assert_equal (1 , popup_getoptions (winid).cursorline )
3122+ popup_close (winid)
3123+
3124+ assert_fails (" popup_create('some text', { cursorline: 2, })" , ' E1023:' )
3125+ popup_clear ()
3126+ enddef
3127+
31153128func Test_previewpopup ()
31163129 CheckScreendump
31173130 CheckFeature quickfix
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 2541 ,
753755/**/
754756 2540 ,
755757/**/
You can’t perform that action at this time.
0 commit comments