]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1814: Patch v9.1.1812 causes crashes v9.1.1814
authorChristian Brabandt <cb@256bit.org>
Tue, 30 Sep 2025 20:01:00 +0000 (20:01 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 30 Sep 2025 20:01:00 +0000 (20:01 +0000)
Problem:  Patch v9.1.1812 causes crashes
Solution: Revert v9.1.1812

Revert "patch 9.1.1812: completion: flicker with slow LSPs"
This reverts commit 71b97f29054135151d618433a11ce611ba25844d.

fixes: #18450

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/globals.h
src/insexpand.c
src/term.c
src/testdir/test_ins_complete.vim
src/version.c

index b105ce5154f1c004ba7498d809f994828c1134e2..5e2f7b0f46bd48cbbadfd2e7a3d5b67192f3d76f 100644 (file)
@@ -1133,9 +1133,6 @@ EXTERN int        secure INIT(= FALSE);
                                // allowed, e.g. when sourcing .exrc or .vimrc
                                // in current directory
 
-EXTERN int     no_flush INIT(= 0);
-                               // non-zero to prevent flushing output buffer
-
 EXTERN int     textlock INIT(= 0);
                                // non-zero when changing text and jumping to
                                // another window or editing another buffer is
index 17d0965ffec181ad653f88393a9edf6aa4fcf0ce..286fc0b472ba3a70f18de5e09f5e58cdd7f13489 100644 (file)
@@ -3601,18 +3601,8 @@ expand_by_function(int type, char_u *base, callback_T *cb)
     // Insert mode in another buffer.
     ++textlock;
 
-    // Suppress flushing of the output buffer. Without this, text removed
-    // temporarily by ins_compl_delete() is flushed to the terminal and shown
-    // as deleted, only to be redrawn later. This causes visible flicker (typed
-    // chars disappear and reappear) when a user func (e.g. an LSP server)
-    // responds slowly. Such funcs may call sleep(), which indirectly triggers
-    // out_flush(). We want deleted text to remain visible.
-    ++no_flush;
-
     retval = call_callback(cb, 0, &rettv, 2, args);
 
-    --no_flush;
-
     // Call a function, which returns a list or dict.
     if (retval == OK)
     {
@@ -6103,6 +6093,7 @@ find_next_completion_match(
     int                compl_fuzzy_match = (cur_cot_flags & COT_FUZZY) != 0;
     string_T   *leader;
 
+
     while (--todo >= 0)
     {
        if (compl_shows_dir_forward() && compl_shown_match->cp_next != NULL)
@@ -6212,7 +6203,7 @@ find_next_completion_match(
  *
  * Note that this function may be called recursively once only.  First with
  * "allow_get_expansion" TRUE, which calls ins_compl_get_exp(), which in turn
- * calls this with "allow_get_expansion" FALSE (via ins_compl_check_keys()).
+ * calls this function with "allow_get_expansion" FALSE.
  */
     static int
 ins_compl_next(
index 0fa5652b3ca7ace66822f35fd8efb629cd51cefa..e2308583732ac610d4b15cee546eded989e9f0a1 100644 (file)
@@ -2772,7 +2772,7 @@ out_flush(void)
 {
     int            len;
 
-    if (no_flush > 0 || out_pos == 0)
+    if (out_pos == 0)
        return;
 
     // set out_pos to 0 before ui_write, to avoid recursiveness
index 5f5fb8d971aba6d0694f4ea1d35bf0eda8c48684..e7346b8b581ac469287ded76cde18df7d70b1fce 100644 (file)
@@ -420,7 +420,7 @@ func Test_CompleteDoneDict()
   au CompleteDone * :call <SID>CompleteDone_CheckCompletedItemDict(0)
 
   set complete=.,F<SID>CompleteDone_CompleteFuncDict
-  execute "normal dda\<C-N>\<C-Y>"
+  execute "normal a\<C-N>\<C-Y>"
   set complete&
 
   call assert_equal(['one', 'two'], v:completed_item[ 'user_data' ])
@@ -473,7 +473,7 @@ func Test_CompleteDoneDictNoUserData()
   let s:called_completedone = 0
 
   set complete=.,F<SID>CompleteDone_CompleteFuncDictNoUserData
-  execute "normal dda\<C-N>\<C-Y>"
+  execute "normal a\<C-N>\<C-Y>"
   set complete&
 
   call assert_equal('', v:completed_item[ 'user_data' ])
index 3cc88a10644753706c67446363ccea666f6b8d03..281038c99e57aab57a9a5ceae982740e2b115db7 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1814,
 /**/
     1813,
 /**/