On 02-Mar-2025 02:30, Christian Brabandt wrote:
patch 9.1.1162: completion popup not cleared in cmdline

Commit:https://github.com/vim/vim/commit/ff159253eb55fa881e1fcfc45f1de5d73d15bdd4
Author: glepnir<glephun...@gmail.com>
Date:   Sat Mar 1 16:17:00 2025 +0100

     patch 9.1.1162: completion popup not cleared in cmdline
Problem: When an info popup spans into the cmdline area and ESC is
               pressed, some content remains visible on screen (yu3s)
     Solution: Add popup_overlays_cmdline() check in screen_fill() to prevent
               prematurely clearing the clear_cmdline flag (glepnir).
fixes: #15627
     closes: #16765
Signed-off-by: glepnir<glephun...@gmail.com>
     Signed-off-by: Christian Brabandt<c...@256bit.org>


After this patch, my windows x64 build (clang 19.1.7) fails to compile with his linker error if FEAT_QUICKFIX is not defined:
<snip>
clang -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--pic-executable -municode -s -mwindows -o gvim.exe gobjx86-64/alloc.o gobjx86-64/arabic.o gobjx86-64/arglist.o gobjx86-64/autocmd.o gobjx86-64/beval.o gobjx86-64/blob.o gobjx86-64/blowfish.o gobjx86-64/buffer.o gobjx86-64/bufwrite.o gobjx86-64/change.o gobjx86-64/charset.o gobjx86-64/cindent.o gobjx86-64/clientserver.o gobjx86-64/clipboard.o gobjx86-64/cmdexpand.o gobjx86-64/cmdhist.o gobjx86-64/crypt.o gobjx86-64/crypt_zip.o gobjx86-64/debugger.o gobjx86-64/dict.o gobjx86-64/diff.o gobjx86-64/digraph.o gobjx86-64/drawline.o gobjx86-64/drawscreen.o gobjx86-64/edit.o gobjx86-64/eval.o gobjx86-64/evalbuffer.o gobjx86-64/evalfunc.o gobjx86-64/evalvars.o gobjx86-64/evalwindow.o gobjx86-64/ex_cmds.o gobjx86-64/ex_cmds2.o gobjx86-64/ex_docmd.o gobjx86-64/ex_eval.o gobjx86-64/ex_getln.o gobjx86-64/fileio.o gobjx86-64/filepath.o gobjx86-64/findfile.o gobjx86-64/float.o gobjx86-64/fold.o gobjx86-64/getchar.o gobjx86-64/gc.o gobjx86-64/gui_xim.o gobjx86-64/hardcopy.o gobjx86-64/hashtab.o gobjx86-64/help.o gobjx86-64/highlight.o gobjx86-64/if_cscope.o gobjx86-64/indent.o gobjx86-64/insexpand.o gobjx86-64/json.o gobjx86-64/linematch.o gobjx86-64/list.o gobjx86-64/locale.o gobjx86-64/logfile.o gobjx86-64/main.o gobjx86-64/map.o gobjx86-64/mark.o gobjx86-64/match.o gobjx86-64/memfile.o gobjx86-64/memline.o gobjx86-64/menu.o gobjx86-64/message.o gobjx86-64/misc1.o gobjx86-64/misc2.o gobjx86-64/mouse.o gobjx86-64/move.o gobjx86-64/mbyte.o gobjx86-64/normal.o gobjx86-64/ops.o gobjx86-64/option.o gobjx86-64/optionstr.o gobjx86-64/os_mswin.o gobjx86-64/os_win32.o gobjx86-64/pathdef.o gobjx86-64/popupmenu.o gobjx86-64/popupwin.o gobjx86-64/profiler.o gobjx86-64/quickfix.o gobjx86-64/regexp.o gobjx86-64/register.o gobjx86-64/scriptfile.o gobjx86-64/screen.o gobjx86-64/search.o gobjx86-64/session.o gobjx86-64/sha256.o gobjx86-64/sign.o gobjx86-64/spell.o gobjx86-64/spellfile.o gobjx86-64/spellsuggest.o gobjx86-64/strings.o gobjx86-64/syntax.o gobjx86-64/tag.o gobjx86-64/term.o gobjx86-64/testing.o gobjx86-64/textformat.o gobjx86-64/textobject.o gobjx86-64/textprop.o gobjx86-64/time.o gobjx86-64/typval.o gobjx86-64/ui.o gobjx86-64/undo.o gobjx86-64/usercmd.o gobjx86-64/userfunc.o gobjx86-64/version.o gobjx86-64/vim9class.o gobjx86-64/vim9cmds.o gobjx86-64/vim9compile.o gobjx86-64/vim9execute.o gobjx86-64/vim9expr.o gobjx86-64/vim9instr.o gobjx86-64/vim9script.o gobjx86-64/vim9type.o gobjx86-64/viminfo.o gobjx86-64/winclip.o gobjx86-64/window.o gobjx86-64/os_w32exe.o gobjx86-64/vimres.o gobjx86-64/xdiffi.o gobjx86-64/xemit.o gobjx86-64/xprepare.o gobjx86-64/xutils.o gobjx86-64/xhistogram.o gobjx86-64/xpatience.o gobjx86-64/gui.o gobjx86-64/gui_w32.o gobjx86-64/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lgcc_eh -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic -lole32 -luuid E:/msys64/ucrt64/bin/ld: gobjx86-64/screen.o:screen.c:(.text+0xd02): undefined reference to `popup_overlaps_cmdline' clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Make_cyg_ming.mak:1170: gvim.exe] Error 1
</snip>

The inclusion of the call to popup_overlaps_cmdline() in screen.c (line 2332) is conditional on the definition of FEAT_PROP_POPUP. However, popup_overlaps_cmdline() is only defined in popupwin.c if FEAT_QUICKFIX is defined (lines 4514 to 4595).

The attached patch tries to correct it.

Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/42e1b7cf-954f-480a-b589-c5a3a2838443%40internode.on.net.
--- screen.c.orig       2025-03-02 06:49:41 +1100
+++ screen.c    2025-03-02 07:09:01 +1100
@@ -2328,7 +2328,7 @@
            redraw_cmdline = TRUE;
            if (start_col == 0 && end_col == Columns
                    && c1 == ' ' && c2 == ' ' && attr == 0
-#ifdef FEAT_PROP_POPUP
+#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
                    && !popup_overlaps_cmdline()
 #endif
                    )

Raspunde prin e-mail lui