Sublime Forum

Usability issue: preserve find and replace history between Sublime Text application instances

#1

Scenario:

  1. Open new Sublime Text application instance. Navigate into folder Folder_A.
  2. Press “Ctrl + H”, type some complicated regex pattern.
  3. Press “Replace All” (to use the complicated regex pattern and to make sure it is saved in the history).
  4. Open new Sublime Text application instance and navigate into folder Folder_B (or into Folder_A): all this via “File => Open Folder…”.
  5. Press “Ctrl + H” and expect to reuse previously used complicated regex pattern.
  6. The drop-down list of previously used find entries is empty! I.e. the complicated regex pattern is gone! Have to retype the complicated regex pattern. Not good.

Version 3.2.1, Build 3207.

P.S. https://www.artlebedev.com/mandership/188/

1 Like

#2

I haven’t tested on the same version yet (though there haven’t been any changes to search state serialization), but I can’t reproduce this behavior. When ST reopens it has the last searched pattern in the search history.

0 Likes

#3

bschaaf, I’ve corrected the scenario. Please retry to reproduce.

0 Likes

#4

One way to implement: each ST instance should write/read find and replace history to/from mutex protected common shared file. Hence the find and replace history will be preserved and common for all the opened ST instances.

0 Likes

#5

What do you mean by a “new application instance”? Do you mean a new window, or how are you launching this separate instance? Sublime Text works with a single session file and thus expects there to ever only be one instance of the application running - an instance can have as many windows as it wants though.

0 Likes

#6

What do you mean by a “new application instance”?

See item 4:

Open new Sublime Text application instance and navigate into folder Folder_B (or into Folder_A): all this via “File => Open Folder…”.

Do you mean a new window, or how are you launching this separate instance?

Yes, I’ve meant a new window (because File => Open Folder… opens a new window).

So, I’d expect that the find and replace history are common for all the windows: if in one window the user changes find and replace history (example: adding new search entry xxx) then in all the other windows find and replace history will be immediately updated (can use previously added search entry xxx).

UPD 20200106: I’ve repeated the scenario on ST4 (build 4094). And it has the same behavior. I open usability issue on GitHub.

0 Likes