Sublime Forum

Bug in Search in Folders

#1

Sublime Text 3 build 3156, Win 10 x64

“Find in Files…” function fails to detected changes in word casing.

I used “Find in Files…”, with case-sensitive option on, both for literal text matching as well as RegEx, to find occurences of a word I wanted to change its casing. First results shown in Result Panel were correct, but then I changed the casing in some files but subsequent search will still show up those files, and the result snippet was still showing the old text casing.

It seems that ST uses some caching system that doesn’t refresh.

This was quite annoying because it involved hundreds of files in a directory tree, and only the casing of some occurences had to be changed, not every single one. So manual intervention in the various files was needed, and running a fresh “Find in Files…” operation was supposed to show a shorter list of files in the results each time, but instead it was always like the first one, making it difficoult to track changed files from untouched ones.

Are there immediate solutions to this problem?

0 Likes

#2

Note that the results view (in a normal view) is not cleared when a new search is issued. You might just be looking at the previous results after performing the second search and not closing the panel before.

0 Likes

#3

I did close the panel before carrying out the new search; and even tried to fix it by adding file filters (hoping this would reset the whole search) … but to no avail, the changed files still show up as unedited.

It really looks like a cache problem.

I’ve experienced different problems with caching in other areas (eg: projects folders in which I manually added or deleted lots of files, etc.), and I always wondered why ST doesn’t have some menu entry for clearing up particular caches (eg: files history, search results, etc.) It might be useful to have some built-in way to clear caches selectively and safely. Right now, ST caching is a black box to me, and don’t really know how it works or could be cleaned.

0 Likes