Sublime Forum

Find with regex show no number of hits

#1

Maybe this issue is already known:

Find with regex activated does not show the number of hits in document in the status bar of the main window.

Regards
Alex

0 Likes

#2

It does for me on Build 4134, Windows 11

Can you provide more details on what ST version & OS you are using ? Maybe provide some screenshots if possible ?

0 Likes

#3

Build 4126
Now I know when it happens: In files that are in a Git repository.
Could that be?

0 Likes

#4

Still can’t reproduce on Build 4126, Windows 11 in a file that is tracked by GIT. I still see the number of match counts in status bar when using Regular Expression mode from Find panel.

0 Likes

#5

I’m also using GitGutter.
Forgot to write: I’m on Windows 10.

0 Likes

#6

I assume a collision with other messages written to the status bar.
For example, in my case I see “File is modified, 4+, 310+, 206#, 14 characters selected” instead of the usual hits number.

0 Likes

#7

Try to use safe mode and see. That would not have any effects of installed packages.

0 Likes

#8

if your file is large then it won’t show.

0 Likes

#9

I safe mode I see the same issue, although the gitgutter message is gone.

0 Likes

#10

the file is indeed large, but why I dont’ have the issue without regex? Besides, the search works, I can cycle through the hits, it only does not show with hit number it is.

0 Likes

#11

That requires the regex searches through the whole file, which can take much time.

Maybe try to tweak this.

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

Ref: https://github.com/sublimehq/sublime_text/issues/4317

1 Like

#12

Thanks. That setting solves the issue.
Frankly, I don’t see any performance impediments after activating it.
Maybe increase the default value?
My file is 5MB large, so I use:

“find_regex_highlight_matches_max_size”: 5242880, // 5MiB

Still no problems with the speed.

0 Likes

#13

ST has too many settings to remember at this point.

0 Likes

#14

The problem likely has less to do with search speed and more to do with degenerate cases of regex like . and the like , in which case you want it to bail out sooner than later as a safety mechanism to protect you from accidents.

0 Likes