Sublime Forum

Sublime Text 4 (4126) does not display matched count in Regexp mode

#1

Same issue as here https://sublimetext.userecho.com/en/communities/1/topics/3857-display-matched-count#

I just upgraded from 3 to 4. However it seems this feature has disappeared.
When I use search with regexp, normally it would give me “x of y matches” showing the matched count. However I see this feature missing now in sublime text 4 (4126).

0 Likes

#2

I use this feature everyday as an data engineer to search and modify data, is it possible to get this feature back for version 4?

0 Likes

#3

can’t reproduce in 4129.

neither in 4126

0 Likes

#4

ST4 / 4126 / Windows

I’ve loaded in a fairly large XML file ~3 million lines.

If I do a regex search for one of the commonly found patterns SEQUENCE_NO\=\" and Find All I end up with 53200 selection regions; Found 53200 matches in the status bar.

Find alone omits the “X of Y matches” and selection regions messages.

On a much smaller file, the “X of Y matches” version seems to pop up.

You can change this by adding the following lines to your settings Preferences -> Settings:

"find_highlight_matches_max_size": 0, // 16MiB

// Same as "find_highlight_matches_max_size" but used when regex is enabled.
"find_regex_highlight_matches_max_size": 0, // 1MiB

this then seemed to work as the OP expects.

I’m on a box with a fair amount of memory - 128Gb - but ST didn’t appear to rise above 1Gb with all my other ST windows / LSP etc. going.

1 Like

#5

Note that removing this limit has heavy performance implications as it means ST will search the entire file for every character you type.

2 Likes

#6

Thanks, that is exactly what I want!!!:grinning:

0 Likes

#7

i tested it again and this happens when the file is beyond ~210k lines (by default settings)

0 Likes