Search code examples
sublimetext3sublimetext2sublimetextsublime-text-plugin

Can I make ST3 remember height of find/replace panel?


I recently upgraded from ST2 to ST3.

In ST2, the find/replace panels would "remember" their height after I resized them.

ST3 doesn't seem to do that. If I resize them, then close and re-open them, they revert to their default height.

Am I doing something wrong? Do I need to enable a setting to get this working in ST3 the same way it worked in ST2?

The following GIF animation shows an example. In frame 1, the "find" panel is open and extended to a larger height. In frame 2, I hit "esc" to close the panel. In the last frame, I hit [ctrl]-[F] to re-open the panel; the panel reopens at its default height.

enter image description here


Solution

  • There is no setting for this particular behaviour, and in general panels should remember the size that they had and keep using them, even across sessions. This is for example a common problem when people change themes and suddenly a panel is much taller or smaller than it used to be due to font size changes.

    That said, although the Find in Files panel remembers it's height the Find, Replace and Incremental Find panels do not in fact remember their size and always open as small as they possibly can.

    I did a little digging and discovered this in the Changelog for build 3016 (6 March 2013):

    Find and Replace panels automatically resize when multi line strings are entered

    I downloaded that build and also build 3015, and indeed in build 3015 the size of those panels is remembered whereas in build 3016 it's not and they always open small.

    As such I would say that this is likely working by design and Jon's intent was to have the panels be as minimal as possible.

    For example, if you paste in multiple lines of text, the panel gets taller, but as you remove lines it shrinks down until it's one line again. As such I don't think it's possible to work around via a plugin either, unfortunately.