nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.72k stars 455 forks source link

feat: align output of searchcount component with neovim default #1202

Open camoz opened 4 months ago

camoz commented 4 months ago

Neovim's default formatting for indicating the search result position, from :h search-commands:

  [1/5]         Cursor is on first of 5 matches.
  [1/>99]       Cursor is on first of more than 99 matches.
  [>99/>99]     Cursor is after 99 match of more than 99 matches.
  [?/??]        Unknown how many matches exists, generating the
                statistics was aborted because of search timeout.

Meaning of result.incomplete, from :h searchcount():

  0: search was fully completed
  1: recomputing was timed out
  2: max count exceeded
camoz commented 4 months ago

I have tested every case locally (result.incomplete == 0|1|2) and it works here. Not sure about the performance impact though.

Also, idk why that blank line was included in the diff :confused:

camoz commented 2 months ago

Been using this for nearly 2 months now without any issues...