On 11-Mar-2023 03:36, Bram Moolenaar wrote:
Patch 9.0.1397
Problem:    Highlight for popupmenu kind and extra cannot be set.
Solution:   Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
             highlight groups and use them. (Gianmaria Bajo, closes #12114)
Files:      runtime/doc/syntax.txt, runtime/doc/options.txt, src/highlight.c,
             src/optiondefs.h, src/popupmenu.c, src/vim.h,
             src/testdir/dumps/Test_pum_highlights_01.dump,
             src/testdir/dumps/Test_pum_highlights_02.dump,
             src/testdir/test_popup.vim


After this patch, my HP-UX build fails with this error:
<snip>
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o objects/popupmenu.o popupmenu.c
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
</snip>

The attached patch seems to fix 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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/1694bf5f-88d8-a52e-b8cf-86d058b2c7e8%40internode.on.net.
--- popupmenu.c.orig    2023-03-11 06:01:39.098424600 +1100
+++ popupmenu.c 2023-03-15 06:02:02.365739200 +1100
@@ -435,9 +435,20 @@
     int                n;
 
     int *ha = highlight_attr;
-    //                  "word"         "kind"          "extra text"
-    int        attrsNorm[3] = { ha[HLF_PNI],   ha[HLF_PNK],    ha[HLF_PNX] };
-    int        attrsSel[3] =  { ha[HLF_PSI],   ha[HLF_PSK],    ha[HLF_PSX] };
+    int        attrsNorm[3];
+    int        attrsSel[3];
+
+    // "word"
+    attrsNorm[0] = ha[HLF_PNI];
+    attrsSel[0] = ha[HLF_PSI];
+
+    // "kind"
+    attrsNorm[1] = ha[HLF_PNK];
+    attrsSel[1] = ha[HLF_PSK];
+
+    // "extra text"
+    attrsNorm[2] = ha[HLF_PNX];
+    attrsSel[2] = ha[HLF_PSX];
 
     if (call_update_screen)
     {

Raspunde prin e-mail lui