Thank you for moving forward with the patch. Just a quick question - given that you have already implemented time-based limits, what is the purpose of the numerical limit? Imagine that you want to count references to a widely used variable, and that number is bigger than 100. If Vim can still count the occurrences in 20ms (which it should for simple patterns), why not display the full count?
On Friday, July 22, 2016 at 4:27:29 PM UTC+2, Christian Brabandt wrote: > Attached patch implements search statistics, like wished at #453. > > This means, when searching, a little buffer on the right will be shown, > that shows, on which match the cursor currently is and how many matches > are in the current buffer, e.g. when searching you'll see something like > this: > ,---- > | /foobar [01/10] > `---- > > Currently, this is limited to at most 99 matches, more matches will be > indicated by something like [>99/>99] if the cursor is beyond match 100. > > To not delay searching too much, the search is limited by 20ms, if the > search does not finish, it will show something like [?/??]. > > Current caveat: the counting does not take search offsets into account. > To get this done correctly is not easy, since the offset will be added > after the search is done and who knows how many matches have been > skipped by then. So I have just left this documented. > > This is made the default behaviour, if you don't want that, > ":set shortmess+=S" gets rid of it. > > The current behaviour is also tested by the new test_search_stat.vim, > which catches the current match positions using execute(). Test seems to > work, although running it interactively does make the test fail. I don't > know why this happens, but since the test works, I guess this is okay. > > Best, > Christian > -- > Man sollte das Leben anderer nicht nur nach seinen eigenen > Bedürfnissen beurteilen. > -- Michael Drury -- -- 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]. For more options, visit https://groups.google.com/d/optout.
