]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1248: compile error when building without FEAT_QUICKFIX v9.1.1248
authorJohn Marriott <basilisk@internode.on.net>
Thu, 27 Mar 2025 17:12:32 +0000 (18:12 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 27 Mar 2025 17:16:52 +0000 (18:16 +0100)
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>
src/popupwin.c
src/testdir/test_vim9_builtin.vim
src/testdir/test_vim9_cmd.vim
src/testdir/test_vim9_disassemble.vim
src/testdir/test_vim9_expr.vim
src/testdir/test_vim9_func.vim
src/testdir/test_vim9_import.vim
src/testdir/test_vim9_script.vim
src/version.c

index 46e54837f5185f738a5e6989790e322db6077025..0cff7f6c090d4872795c6b892b312e4bcf3955af 100644 (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)
 
 /*
index f8e130603dfa0c69fe96ad53ac4b1bb5db1aba96..22f8bab36bf228f26b8d1d2b4b9080b49b744ddf 100644 (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([])
 
index 26a3f09a13e081606c9374782efe574425925f3e..d76e3bd5709d2f096facae6a225e75c5da06ad7e 100644 (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
index 48779337ced0d95627f5731facc2bf55528f929d..e98ab75afae6505e928158be7bc4a42153b0b6c2 100644 (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*' ..
index 57347318e0ec2b8955e1b6cf163e7d9ebb0af257..e8882bd9558d549aff4816b5d53047d3b3879d20 100644 (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'])
index 4e31f34d6a97b801a7cab3c37669deb0ac994031..fbd128a9b724a9ee96c1a75ba9e0758ea9d5932d 100644 (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()
index 8376a9316e1f06247459b0a7f62e189c9b479fa6..1c8136a0db32a7b6dceb533f2f5eb31be299653b 100644 (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
index b29f3cd80c4558357a0ea489d6b77a479453bb2a..d9013ddf54ead91043ad2f3c8cd9bb0427fdcb06 100644 (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
index e0d734c582a9a0cc87bd37124850498528dc5906..9569a09fe3dfb8a7d11e4623ae82856efd4b2e7b 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1248,
 /**/
     1247,
 /**/