Sublime Forum

Local search query doesn't carry over to global search

#1

If I do a search for “loaduser” (for example) and then quickly use cmd+shift+f to change to a global search, the term is often truncated to something like “l” or “load”… this doesn’t seem to happen if I wait for a couple of seconds before doing cmd+shift+f, but considering that this is something that I do more than twenty times a day, this is extremely frustrating.

Please help. I’m using build 3083, but this has been going on for many months now. This bug does not exist in SublimeText 2.
Adam

1 Like

#2

Is there any plan to fix this bug?

0 Likes

#3

This is driving me crazy daily. It’s 2018 and this is still an issue. In conjunction to accidentally hitting Find when there is only a space or letter in search box - and the whole UI freezes while Sublime is annoyingly stupid and sifts through thousands of files and there is no way to cancel it. :angry: :confounded: :weary:

0 Likes

#4

2019, still an issue.

0 Likes

#5

Is it really a question of how fast you switch from search to global search?

I am on Windows and it normally works pretty fine no matter how fast I switch. As I saw this happen occacionally, I tried to reproduce this issue.

Steps to reproduce

  1. Open a file, which contains random words and “loadus”, but not “loaduser”.
  2. Open the search via ctrl+f
  3. Enter “loaduser” into the search intput.
  4. Press ctrl+shift+f
  5. ST runs the local search, finds “loadus”, and adds it to the global search input field.

Here is an related core issue about it, even though it describes the issue to be triggered, when switching from Find to Replace panel. The behavior is the same.

0 Likes

#6

I can confirm, that is the actual behaviour. Thanks you for figuring out and responding. It’s maddening, not sure why more people don’t care about it. :cry:

0 Likes

#7

@deathaxe, I don’t think it’s necessarily adding to the global search input field, but instead using the current selection in the document when opening the new panel. You’ll see that behavior a bit more obvious when searching with regex.

@davorin, here is a workaround for you (that isn’t to copy+paste between panels):

  1. open Find… via ctrl+f
  2. enter loaduser into the search input
  3. press enter
    • pressing enter forces the search term to be added to history
  4. open Find in Files… via ctrl+shift+f
  5. press the up arrow & then the down arrow
    • this switches the input based on the history you just added to
0 Likes

#8

I just discussed the issue based on that example. You are absolutely right.

0 Likes