I sometimes search for lines that exceed some length with a search
pattern like this:
/\%79v.
Even when the number of matches is small, the search count message
sometimes shows "[?/??]".
Steps to reproduce
1. cd to Vim's src directory.
2. Execute
$ vim -N -u NONE -i NONE -c 'set shortmess-=S' option.c
3. Type the following search pattern.
/\%82v.
4. Note the search count message, which is
[?/??]
There are 14 matches in that file, well within the limits of the
search count message.
Expected behavior
I expected the search count message to be [1/14].
Version of Vim
8.2.3941
Environment
Operating system: Ubuntu 20.04.3 LTS
Terminal: Chromebook Crosh Window
Value of $TERM: screen-256color
Shell: bash 5.0.17
The Crosh Window is running bash and ssh to the remote host,
which is running tmux 2.9a.
Additional Information
I tried to use main.c as the example file, i.e.
$ vim -N -u NONE -i NONE -c 'set shortmess-=S' main.c
and a search pattern of
/\%79v.
but the results were not repeatable. I would hit n to go to the
next match and sometimes the search count message would be
correct and at other matches it would be [?/??]. Further,
I could pass a match showing [?/??] by typing n, the next match
would have a correct search count message, then I could type
N to go back to the [?/??] message and it would be correct.
Which matches showed correct messages and which showed [?/??]
varied each time I ran vim, as though there was an uninitialized
variable involved.
Regards,
Gary
--
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211231092719.GB10680%40phoenix.