1
0
forked from aniani/vim

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 <h.east.727@gmail.com>
Co-authored-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
John Marriott
2025-03-27 18:12:32 +01:00
committed by Christian Brabandt
parent 7d8e7df551
commit 45377e2096
9 changed files with 29 additions and 11 deletions

View File

@@ -40,11 +40,11 @@ static int message_win_time = 3000;
// hit-enter prompt.
static int start_message_win_timer = FALSE;
static int popup_on_cmdline = FALSE;
static void may_start_message_win_timer(win_T *wp);
#endif
static int popup_on_cmdline = FALSE;
static void popup_adjust_position(win_T *wp);
/*
@@ -4586,15 +4586,6 @@ popup_hide_info(void)
}
}
/*
* Returns TRUE if a popup extends into the cmdline area.
*/
int
popup_overlaps_cmdline(void)
{
return popup_on_cmdline;
}
/*
* Close any info popup.
*/
@@ -4608,6 +4599,15 @@ popup_close_info(void)
}
#endif
/*
* Returns TRUE if a popup extends into the cmdline area.
*/
int
popup_overlaps_cmdline(void)
{
return popup_on_cmdline;
}
#if defined(HAS_MESSAGE_WINDOW) || defined(PROTO)
/*

View File

@@ -1759,6 +1759,7 @@ def Test_garbagecollect()
enddef
def Test_get()
CheckFeature quickfix
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'])
[3, 5, 2]->get(1)->assert_equal(5)
[3, 5, 2]->get(3)->assert_equal(0)
@@ -1980,11 +1981,13 @@ def Test_getline()
enddef
def Test_getloclist()
CheckFeature quickfix
v9.CheckSourceDefAndScriptFailure(['getloclist("x")'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1'])
v9.CheckSourceDefAndScriptFailure(['getloclist(1, [])'], ['E1013: Argument 2: type mismatch, expected dict<any> but got list<any>', 'E1206: Dictionary required for argument 2'])
enddef
def Test_getloclist_return_type()
CheckFeature quickfix
var l = getloclist(1)
l->assert_equal([])
@@ -2012,11 +2015,13 @@ def Test_getpos()
enddef
def Test_getqflist()
CheckFeature quickfix
v9.CheckSourceDefAndScriptFailure(['getqflist([])'], ['E1013: Argument 1: type mismatch, expected dict<any> but got list<any>', 'E1206: Dictionary required for argument 1'])
call assert_equal({}, getqflist({}))
enddef
def Test_getqflist_return_type()
CheckFeature quickfix
var l = getqflist()
l->assert_equal([])

View File

@@ -2108,12 +2108,14 @@ enddef
" Test for the 'previewpopup' option
def Test_previewpopup()
CheckFeature quickfix
set previewpopup=height:10,width:60
pedit Xppfile
s:check_previewpopup('Xppfile')
enddef
def Test_previewpopup_pbuffer()
CheckFeature quickfix
set previewpopup=height:10,width:60
edit Xppfile
pbuffer

View File

@@ -243,6 +243,7 @@ def s:Cexpr()
enddef
def Test_disassemble_cexpr()
CheckFeature quickfix
var res = execute('disass s:Cexpr')
assert_match('<SNR>\d*_Cexpr.*' ..
' var errors = "list of errors"\_s*' ..

View File

@@ -3292,6 +3292,7 @@ def SetSomeVar()
enddef
def Test_expr9_option()
CheckFeature quickfix
var lines =<< trim END
# option
set ts=11
@@ -3639,6 +3640,7 @@ def Test_expr9_call_autoload()
enddef
def Test_expr9_method_call()
CheckFeature quickfix
var lines =<< trim END
new
setline(1, ['first', 'last'])

View File

@@ -3718,6 +3718,7 @@ def Test_invalid_function_name()
enddef
def Test_partial_call()
CheckFeature quickfix
var lines =<< trim END
var Xsetlist: func
Xsetlist = function('setloclist', [0])
@@ -4574,6 +4575,7 @@ def Test_multiple_funcref()
enddef
def Test_cexpr_errmsg_line_number()
CheckFeature quickfix
var lines =<< trim END
vim9script
def Func()

View File

@@ -657,6 +657,7 @@ def Test_import_export_expr_map()
enddef
def Test_import_in_filetype()
CheckFeature quickfix
# check that :import works when the buffer is locked
mkdir('ftplugin', 'pR')
var export_lines =<< trim END

View File

@@ -1226,6 +1226,7 @@ def Test_nocatch_return_in_try()
enddef
def Test_cnext_works_in_catch()
CheckFeature quickfix
var lines =<< trim END
vim9script
au BufEnter * eval 1 + 2
@@ -1541,6 +1542,7 @@ def Test_abort_after_error()
enddef
def Test_cexpr_vimscript()
CheckFeature quickfix
# only checks line continuation
set errorformat=File\ %f\ line\ %l
var lines =<< trim END
@@ -3991,6 +3993,7 @@ func Test_vim9script_not_global()
endfunc
def Test_vim9_copen()
CheckFeature quickfix
# this was giving an error for setting w:quickfix_title
copen
quit

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1248,
/**/
1247,
/**/