Sublime Forum

Status bar does not show position in list of matches

#1

With the new ST4, the status bar does not show position in list of matches when the regular expression option is activated.

More detailed description:
CTRL+F to open the find dialog, activate the regular expression button (.*) and search for something that leads to multiple hits. Normally, cycling though the hits shows a short text in the status bar, which hit is currently selected (e.g. 6 of 14 matches).

0 Likes

#2

I can’t reproduce this on Windows 10 in safe mode both on stable 4107 & dev 4106 (see the GIF below). So, two things

  1. What OS are you using ?
  2. Have you checked in safe mode to see if the problem persists ?

0 Likes

#3

I tried again on a much smaller file and there is works.
The issue persists on a large file (5 MB).
I’m on Windows 10.
ST build is 4107.

0 Likes

#4

The “Highlight Matches” option gets automatically disabled for large files, as having that enabled can significantly slow down things. You can manually re-enable it if desired.

0 Likes

#5

How exactly can I write this option, “highlight_matches”: true?
The above does not change a thing.
Besides, the issue is not about highlighting, it’s about showing the number of matches. Are the two interconnected?

0 Likes

#6

The number of matches can only be determined if all matches are found before performing the find. The “Highlight Matches” option enables this:

Screenshot%20from%202021-06-21%2017-38-08

0 Likes

#7

Oh, I get it.
But no, this is not deactivated in my case.
The issue is, that the text info written in the status bar does not show the typical e.g. “5 of 12 matches” info.
If the regex option is deactived, the info is shown.
If the regex option is actived, the info is not shown.

0 Likes

#8

The heuristic for deactivating “Highlight Matches” is lower for regex searches, as they are more expensive. Try a smaller file and it should work, at least in safe mode.

0 Likes

#9

Yes, I already wrote that it works wiith smaller files.
But since my files are practically always large, I’m starting thinking about reverting to ST3 because it worked there.
So for me, this is a regression bug in ST4.

0 Likes

#10

Reading this topic I played around and found some interesting points regarding highlight matches, are they all new in ST4 or did I never realize it?

  1. Small files → live highlighting, bigger files → only after pressing “search” (is this what you meant, @bschaaf ? )
  2. I have ~40MB JSON opened as PlainText. Searching e.g. for a “name” (without quotation marks), which is a key of the JSON, highlights all matching keys after hitting Enter. Searching for “open_” which is part of a JSON key “open_sa” doesn’t highlight at all. It seems as if the JSON keys would be tokenized or so although the .json file is opened as Plain Text and this influences the search highlighting.

All in all I think I’d also prefer to be able to adjust limits etc on the the Highlight Matches function.

0 Likes

#11

Sublime Text 3 will happily highlight 3M occurrences and hang the UI for seconds at a time as you type your search query. It’s preferable to disable features that cause this on large files, hence why ST4 disables highlighting matches for large files. Those limits can be made configurable though, feel free to add an enhancement request to the issue tracker.

0 Likes