patch 9.1.1563: completion: ruler may disappear

Commit: 
https://github.com/vim/vim/commit/824286c9a727811ed93e4e2f4f10944f735436e7
Author: Girish Palya <giris...@gmail.com>
Date:   Thu Jul 17 22:02:57 2025 +0200

    patch 9.1.1563: completion: ruler may disappear
    
    Problem:  The ruler disappears after typing the second character during
              insert mode completion, even when completion messages are
              suppressed ('shortmess' includes "c"). This makes the UI
              appear inconsistent.
    Solution: Ensure the ruler is restored during screen redraw when popup
              completion is active (Girish Palya).
    
    Notes:
    No new tests were added, as existing screen dump tests were updated to
    reflect the corrected behavior.
    
    closes: #17770
    
    Signed-off-by: Girish Palya <giris...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/po/vim.pot b/src/po/vim.pot
index 11c4dbd48..18e99cfe5 100644
--- a/src/po/vim.pot
+++ b/src/po/vim.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION
"
 "Report-Msgid-Bugs-To: 
"
-"POT-Creation-Date: 2025-07-17 20:16+0200
"
+"POT-Creation-Date: 2025-07-17 22:02+0200
"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>
"
 "Language-Team: LANGUAGE <l...@li.org>
"
@@ -3315,71 +3315,71 @@ msgid ""
 "Type Name Content"
 msgstr ""
 
-#: ../screen.c:4127
+#: ../screen.c:4128
 msgid " VREPLACE"
 msgstr ""
 
-#: ../screen.c:4129
+#: ../screen.c:4130
 msgid " REPLACE"
 msgstr ""
 
-#: ../screen.c:4134
+#: ../screen.c:4135
 msgid " REVERSE"
 msgstr ""
 
-#: ../screen.c:4136
+#: ../screen.c:4137
 msgid " INSERT"
 msgstr ""
 
-#: ../screen.c:4140
+#: ../screen.c:4141
 msgid " (insert)"
 msgstr ""
 
-#: ../screen.c:4142
+#: ../screen.c:4143
 msgid " (replace)"
 msgstr ""
 
-#: ../screen.c:4144
+#: ../screen.c:4145
 msgid " (vreplace)"
 msgstr ""
 
-#: ../screen.c:4147
+#: ../screen.c:4148
 msgid " Hebrew"
 msgstr ""
 
-#: ../screen.c:4154
+#: ../screen.c:4155
 msgid " Arabic"
 msgstr ""
 
-#: ../screen.c:4163
+#: ../screen.c:4164
 msgid " (paste)"
 msgstr ""
 
-#: ../screen.c:4175
+#: ../screen.c:4176
 msgid " VISUAL"
 msgstr ""
 
-#: ../screen.c:4176
+#: ../screen.c:4177
 msgid " VISUAL LINE"
 msgstr ""
 
-#: ../screen.c:4177
+#: ../screen.c:4178
 msgid " VISUAL BLOCK"
 msgstr ""
 
-#: ../screen.c:4178
+#: ../screen.c:4179
 msgid " SELECT"
 msgstr ""
 
-#: ../screen.c:4179
+#: ../screen.c:4180
 msgid " SELECT LINE"
 msgstr ""
 
-#: ../screen.c:4180
+#: ../screen.c:4181
 msgid " SELECT BLOCK"
 msgstr ""
 
-#: ../screen.c:4277
+#: ../screen.c:4282
 msgid "recording"
 msgstr ""
 
@@ -4257,327 +4257,327 @@ msgstr ""
 msgid "%s (%s, compiled %s)"
 msgstr ""
 
-#: ../version.c:4050
+#: ../version.c:4060
 msgid ""
 "
"
 "MS-Windows ARM64 GUI/console version"
 msgstr ""
 
-#: ../version.c:4052
+#: ../version.c:4062
 msgid ""
 "
"
 "MS-Windows 64-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4055
+#: ../version.c:4065
 msgid ""
 "
"
 "MS-Windows 32-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4060
+#: ../version.c:4070
 msgid ""
 "
"
 "MS-Windows ARM64 GUI version"
 msgstr ""
 
-#: ../version.c:4062
+#: ../version.c:4072
 msgid ""
 "
"
 "MS-Windows 64-bit GUI version"
 msgstr ""
 
-#: ../version.c:4065
+#: ../version.c:4075
 msgid ""
 "
"
 "MS-Windows 32-bit GUI version"
 msgstr ""
 
-#: ../version.c:4069
+#: ../version.c:4079
 msgid " with OLE support"
 msgstr ""
 
-#: ../version.c:4074
+#: ../version.c:4084
 msgid ""
 "
"
 "MS-Windows ARM64 console version"
 msgstr ""
 
-#: ../version.c:4076
+#: ../version.c:4086
 msgid ""
 "
"
 "MS-Windows 64-bit console version"
 msgstr ""
 
-#: ../version.c:4079
+#: ../version.c:4089
 msgid ""
 "
"
 "MS-Windows 32-bit console version"
 msgstr ""
 
-#: ../version.c:4085
+#: ../version.c:4095
 msgid ""
 "
"
 "macOS version"
 msgstr ""
 
-#: ../version.c:4087
+#: ../version.c:4097
 msgid ""
 "
"
 "macOS version w/o darwin feat."
 msgstr ""
 
-#: ../version.c:4097
+#: ../version.c:4107
 msgid ""
 "
"
 "OpenVMS version"
 msgstr ""
 
-#: ../version.c:4112
+#: ../version.c:4122
 msgid ""
 "
"
 "Included patches: "
 msgstr ""
 
-#: ../version.c:4137
+#: ../version.c:4147
 msgid ""
 "
"
 "Extra patches: "
 msgstr ""
 
-#: ../version.c:4149 ../version.c:4460
+#: ../version.c:4159 ../version.c:4470
 msgid "Modified by "
 msgstr ""
 
-#: ../version.c:4156
+#: ../version.c:4166
 msgid ""
 "
"
 "Compiled "
 msgstr ""
 
-#: ../version.c:4159
+#: ../version.c:4169
 msgid "by "
 msgstr ""
 
-#: ../version.c:4171
+#: ../version.c:4181
 msgid ""
 "
"
 "Huge version "
 msgstr ""
 
-#: ../version.c:4173
+#: ../version.c:4183
 msgid ""
 "
"
 "Normal version "
 msgstr ""
 
-#: ../version.c:4175
+#: ../version.c:4185
 msgid ""
 "
"
 "Tiny version "
 msgstr ""
 
-#: ../version.c:4178
+#: ../version.c:4188
 msgid "without GUI."
 msgstr ""
 
-#: ../version.c:4181
+#: ../version.c:4191
 msgid "with GTK3 GUI."
 msgstr ""
 
-#: ../version.c:4183
+#: ../version.c:4193
 msgid "with GTK2-GNOME GUI."
 msgstr ""
 
-#: ../version.c:4185
+#: ../version.c:4195
 msgid "with GTK2 GUI."
 msgstr ""
 
-#: ../version.c:4188
+#: ../version.c:4198
 msgid "with X11-Motif GUI."
 msgstr ""
 
-#: ../version.c:4190
+#: ../version.c:4200
 msgid "with Haiku GUI."
 msgstr ""
 
-#: ../version.c:4192
+#: ../version.c:4202
 msgid "with Photon GUI."
 msgstr ""
 
-#: ../version.c:4194
+#: ../version.c:4204
 msgid "with GUI."
 msgstr ""
 
-#: ../version.c:4196
+#: ../version.c:4206
 msgid "  Features included (+) or not (-):
"
 msgstr ""
 
-#: ../version.c:4203
+#: ../version.c:4213
 msgid "   system vimrc file: \""
 msgstr ""
 
-#: ../version.c:4208
+#: ../version.c:4218
 msgid "     user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4213
+#: ../version.c:4223
 msgid " 2nd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4218 ../version.c:4225 ../version.c:4229
+#: ../version.c:4228 ../version.c:4235 ../version.c:4239
 msgid " 3rd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4221
+#: ../version.c:4231
 msgid " 4th user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4234
+#: ../version.c:4244
 msgid "      user exrc file: \""
 msgstr ""
 
-#: ../version.c:4239
+#: ../version.c:4249
 msgid "  2nd user exrc file: \""
 msgstr ""
 
-#: ../version.c:4245
+#: ../version.c:4255
 msgid "  system gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4249
+#: ../version.c:4259
 msgid "    user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4253
+#: ../version.c:4263
 msgid "2nd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4258
+#: ../version.c:4268
 msgid "3rd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4263
+#: ../version.c:4273
 msgid "       defaults file: \""
 msgstr ""
 
-#: ../version.c:4268
+#: ../version.c:4278
 msgid "    system menu file: \""
 msgstr ""
 
-#: ../version.c:4276
+#: ../version.c:4286
 msgid "  fall-back for $VIM: \""
 msgstr ""
 
-#: ../version.c:4282
+#: ../version.c:4292
 msgid " f-b for $VIMRUNTIME: \""
 msgstr ""
 
-#: ../version.c:4286
+#: ../version.c:4296
 msgid "Compilation: "
 msgstr ""
 
-#: ../version.c:4292
+#: ../version.c:4302
 msgid "Compiler: "
 msgstr ""
 
-#: ../version.c:4297
+#: ../version.c:4307
 msgid "Linking: "
 msgstr ""
 
-#: ../version.c:4302
+#: ../version.c:4312
 msgid "  DEBUG BUILD"
 msgstr ""
 
-#: ../version.c:4338
+#: ../version.c:4348
 msgid "VIM - Vi IMproved"
 msgstr ""
 
-#: ../version.c:4340
+#: ../version.c:4350
 msgid "version "
 msgstr ""
 
-#: ../version.c:4341
+#: ../version.c:4351
 msgid "by Bram Moolenaar et al."
 msgstr ""
 
-#: ../version.c:4345
+#: ../version.c:4355
 msgid "Vim is open source and freely distributable"
 msgstr ""
 
-#: ../version.c:4347
+#: ../version.c:4357
 msgid "Help poor children in Uganda!"
 msgstr ""
 
-#: ../version.c:4348
+#: ../version.c:4358
 msgid "type  :help iccf<Enter>       for information "
 msgstr ""
 
-#: ../version.c:4350
+#: ../version.c:4360
 msgid "type  :q<Enter>               to exit         "
 msgstr ""
 
-#: ../version.c:4351
+#: ../version.c:4361
 msgid "type  :help<Enter>  or  <F1>  for on-line help"
 msgstr ""
 
-#: ../version.c:4352
+#: ../version.c:4362
 msgid "type  :help version9<Enter>   for version info"
 msgstr ""
 
-#: ../version.c:4355
+#: ../version.c:4365
 msgid "Running in Vi compatible mode"
 msgstr ""
 
-#: ../version.c:4356
+#: ../version.c:4366
 msgid "type  :set nocp<Enter>        for Vim defaults"
 msgstr ""
 
-#: ../version.c:4357
+#: ../version.c:4367
 msgid "type  :help cp-default<Enter> for info on this"
 msgstr ""
 
-#: ../version.c:4372
+#: ../version.c:4382
 msgid "menu  Help->Orphans           for information    "
 msgstr ""
 
-#: ../version.c:4374
+#: ../version.c:4384
 msgid "Running modeless, typed text is inserted"
 msgstr ""
 
-#: ../version.c:4375
+#: ../version.c:4385
 msgid "menu  Edit->Global Settings->Toggle Insert Mode  "
 msgstr ""
 
-#: ../version.c:4376
+#: ../version.c:4386
 msgid "                              for two modes      "
 msgstr ""
 
-#: ../version.c:4380
+#: ../version.c:4390
 msgid "menu  Edit->Global Settings->Toggle Vi Compatible"
 msgstr ""
 
-#: ../version.c:4381
+#: ../version.c:4391
 msgid "                              for Vim defaults   "
 msgstr ""
 
-#: ../version.c:4422
+#: ../version.c:4432
 msgid "Sponsor Vim development!"
 msgstr ""
 
-#: ../version.c:4423
+#: ../version.c:4433
 msgid "Become a registered Vim user!"
 msgstr ""
 
-#: ../version.c:4426
+#: ../version.c:4436
 msgid "type  :help sponsor<Enter>    for information "
 msgstr ""
 
-#: ../version.c:4427
+#: ../version.c:4437
 msgid "type  :help register<Enter>   for information "
 msgstr ""
 
-#: ../version.c:4429
+#: ../version.c:4439
 msgid "menu  Help->Sponsor/Register  for information    "
 msgstr ""
 
diff --git a/src/screen.c b/src/screen.c
index 267791e96..8f9a11014 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4051,6 +4051,7 @@ showmode(void)
     int                attr;
     int                nwr_save;
     int                sub_attr;
+    int                show_ruler_with_pum = FALSE;
 
     do_mode = p_smd && msg_silent == 0
            && ((State & MODE_INSERT)
@@ -4182,6 +4183,10 @@ showmode(void)
                    msg_puts_attr(_(p), attr);
                }
                msg_puts_attr(" --", attr);
+               // Ensure ruler is shown when a popup is visible and only the 
mode name
+               // is displayed. Without this, the ruler may disappear during 
insert-mode
+               // completion when 'shortmess' includes 'c'.
+               show_ruler_with_pum = TRUE;
            }
 
            need_clear = TRUE;
@@ -4217,7 +4222,7 @@ showmode(void)
     // If the last window has no status line, the ruler is after the mode
     // message and must be redrawn
     if (redrawing() && lastwin->w_status_height == 0)
-       win_redr_ruler(lastwin, TRUE, FALSE);
+       win_redr_ruler(lastwin, TRUE, show_ruler_with_pum);
 
     redraw_cmdline = FALSE;
     redraw_mode = FALSE;
diff --git a/src/testdir/dumps/Test_pum_highlights_09.dump 
b/src/testdir/dumps/Test_pum_highlights_09.dump
index 3616c80b6..4e7d08b79 100644
--- a/src/testdir/dumps/Test_pum_highlights_09.dump
+++ b/src/testdir/dumps/Test_pum_highlights_09.dump
@@ -17,4 +17,4 @@
 |~| @73
 |~| @73
 |~| @73
-|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|A|l@1| 
diff --git a/src/testdir/dumps/Test_pum_with_special_characters_13.dump 
b/src/testdir/dumps/Test_pum_with_special_characters_13.dump
index de505d27d..313d50078 100644
--- a/src/testdir/dumps/Test_pum_with_special_characters_13.dump
+++ b/src/testdir/dumps/Test_pum_with_special_characters_13.dump
@@ -9,4 +9,4 @@
 |~| @73
 |~| @73
 |~| @73
-|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|3|,|1| @10|A|l@1| 
diff --git a/src/testdir/dumps/Test_shortmess_complmsg_2.dump 
b/src/testdir/dumps/Test_shortmess_complmsg_2.dump
index 542733b30..66c421b59 100644
--- a/src/testdir/dumps/Test_shortmess_complmsg_2.dump
+++ b/src/testdir/dumps/Test_shortmess_complmsg_2.dump
@@ -9,4 +9,4 @@
 |~| @73
 |~| @73
 |~| @73
-|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@62
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|4|,|1| @10|A|l@1| 
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 956aef1b1..fac2a7592 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -218,7 +218,6 @@ func Test_popup_complete()
   set completeopt&
 endfunc
 
-
 func Test_popup_completion_insertmode()
   new
   inoremap <F5> <C-R>=ListMonths()<CR>
diff --git a/src/version.c b/src/version.c
index 22480a00c..2e51a442d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1563,
 /**/
     1562,
 /**/

-- 
-- 
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/E1ucV0S-00BmeC-2N%40256bit.org.

Raspunde prin e-mail lui