Skip to content

Commit 45377e2

Browse files
John Marriotth-eastarpadffyzeertzjq
authored andcommitted
patch 9.1.1248: compile error when building without FEAT_QUICKFIX
Problem: compile error when building without FEAT_QUICKFIX Solution: adjust ifdefs in popupwin.c, add CheckFeature quickfix to a few tests (John Marriott, Hirohito Higashi) closes: #16940 closes: #16962 Co-authored-by: Hirohito Higashi <[email protected]> Co-authored-by: Zoltan Arpadffy <[email protected]> Co-authored-by: zeertzjq <[email protected]> Signed-off-by: John Marriott <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 7d8e7df commit 45377e2

9 files changed

Lines changed: 29 additions & 11 deletions

src/popupwin.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ static int message_win_time = 3000;
4040
// hit-enter prompt.
4141
static int start_message_win_timer = FALSE;
4242

43-
static int popup_on_cmdline = FALSE;
44-
4543
static void may_start_message_win_timer(win_T *wp);
4644
#endif
4745

46+
static int popup_on_cmdline = FALSE;
47+
4848
static void popup_adjust_position(win_T *wp);
4949

5050
/*
@@ -4586,15 +4586,6 @@ popup_hide_info(void)
45864586
}
45874587
}
45884588

4589-
/*
4590-
* Returns TRUE if a popup extends into the cmdline area.
4591-
*/
4592-
int
4593-
popup_overlaps_cmdline(void)
4594-
{
4595-
return popup_on_cmdline;
4596-
}
4597-
45984589
/*
45994590
* Close any info popup.
46004591
*/
@@ -4608,6 +4599,15 @@ popup_close_info(void)
46084599
}
46094600
#endif
46104601

4602+
/*
4603+
* Returns TRUE if a popup extends into the cmdline area.
4604+
*/
4605+
int
4606+
popup_overlaps_cmdline(void)
4607+
{
4608+
return popup_on_cmdline;
4609+
}
4610+
46114611
#if defined(HAS_MESSAGE_WINDOW) || defined(PROTO)
46124612

46134613
/*

src/testdir/test_vim9_builtin.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,7 @@ def Test_garbagecollect()
17591759
enddef
17601760

17611761
def Test_get()
1762+
CheckFeature quickfix
17621763
v9.CheckSourceDefAndScriptFailure(['get("a", 1)'], ['E1013: Argument 1: type mismatch, expected list<any> but got string', 'E1531: Argument of get() must be a List, Tuple, Dictionary or Blob'])
17631764
[3, 5, 2]->get(1)->assert_equal(5)
17641765
[3, 5, 2]->get(3)->assert_equal(0)
@@ -1980,11 +1981,13 @@ def Test_getline()
19801981
enddef
19811982

19821983
def Test_getloclist()
1984+
CheckFeature quickfix
19831985
v9.CheckSourceDefAndScriptFailure(['getloclist("x")'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1'])
19841986
v9.CheckSourceDefAndScriptFailure(['getloclist(1, [])'], ['E1013: Argument 2: type mismatch, expected dict<any> but got list<any>', 'E1206: Dictionary required for argument 2'])
19851987
enddef
19861988

19871989
def Test_getloclist_return_type()
1990+
CheckFeature quickfix
19881991
var l = getloclist(1)
19891992
l->assert_equal([])
19901993

@@ -2012,11 +2015,13 @@ def Test_getpos()
20122015
enddef
20132016

20142017
def Test_getqflist()
2018+
CheckFeature quickfix
20152019
v9.CheckSourceDefAndScriptFailure(['getqflist([])'], ['E1013: Argument 1: type mismatch, expected dict<any> but got list<any>', 'E1206: Dictionary required for argument 1'])
20162020
call assert_equal({}, getqflist({}))
20172021
enddef
20182022

20192023
def Test_getqflist_return_type()
2024+
CheckFeature quickfix
20202025
var l = getqflist()
20212026
l->assert_equal([])
20222027

src/testdir/test_vim9_cmd.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,12 +2108,14 @@ enddef
21082108

21092109
" Test for the 'previewpopup' option
21102110
def Test_previewpopup()
2111+
CheckFeature quickfix
21112112
set previewpopup=height:10,width:60
21122113
pedit Xppfile
21132114
s:check_previewpopup('Xppfile')
21142115
enddef
21152116

21162117
def Test_previewpopup_pbuffer()
2118+
CheckFeature quickfix
21172119
set previewpopup=height:10,width:60
21182120
edit Xppfile
21192121
pbuffer

src/testdir/test_vim9_disassemble.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def s:Cexpr()
243243
enddef
244244

245245
def Test_disassemble_cexpr()
246+
CheckFeature quickfix
246247
var res = execute('disass s:Cexpr')
247248
assert_match('<SNR>\d*_Cexpr.*' ..
248249
' var errors = "list of errors"\_s*' ..

src/testdir/test_vim9_expr.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3292,6 +3292,7 @@ def SetSomeVar()
32923292
enddef
32933293

32943294
def Test_expr9_option()
3295+
CheckFeature quickfix
32953296
var lines =<< trim END
32963297
# option
32973298
set ts=11
@@ -3639,6 +3640,7 @@ def Test_expr9_call_autoload()
36393640
enddef
36403641

36413642
def Test_expr9_method_call()
3643+
CheckFeature quickfix
36423644
var lines =<< trim END
36433645
new
36443646
setline(1, ['first', 'last'])

src/testdir/test_vim9_func.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,6 +3718,7 @@ def Test_invalid_function_name()
37183718
enddef
37193719

37203720
def Test_partial_call()
3721+
CheckFeature quickfix
37213722
var lines =<< trim END
37223723
var Xsetlist: func
37233724
Xsetlist = function('setloclist', [0])
@@ -4574,6 +4575,7 @@ def Test_multiple_funcref()
45744575
enddef
45754576

45764577
def Test_cexpr_errmsg_line_number()
4578+
CheckFeature quickfix
45774579
var lines =<< trim END
45784580
vim9script
45794581
def Func()

src/testdir/test_vim9_import.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ def Test_import_export_expr_map()
657657
enddef
658658

659659
def Test_import_in_filetype()
660+
CheckFeature quickfix
660661
# check that :import works when the buffer is locked
661662
mkdir('ftplugin', 'pR')
662663
var export_lines =<< trim END

src/testdir/test_vim9_script.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,7 @@ def Test_nocatch_return_in_try()
12261226
enddef
12271227

12281228
def Test_cnext_works_in_catch()
1229+
CheckFeature quickfix
12291230
var lines =<< trim END
12301231
vim9script
12311232
au BufEnter * eval 1 + 2
@@ -1541,6 +1542,7 @@ def Test_abort_after_error()
15411542
enddef
15421543

15431544
def Test_cexpr_vimscript()
1545+
CheckFeature quickfix
15441546
# only checks line continuation
15451547
set errorformat=File\ %f\ line\ %l
15461548
var lines =<< trim END
@@ -3991,6 +3993,7 @@ func Test_vim9script_not_global()
39913993
endfunc
39923994

39933995
def Test_vim9_copen()
3996+
CheckFeature quickfix
39943997
# this was giving an error for setting w:quickfix_title
39953998
copen
39963999
quit

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1248,
707709
/**/
708710
1247,
709711
/**/

0 commit comments

Comments
 (0)