noonat / sublime-gofmt

Sublime plugin to run gofmt (or goimports, or whatever you want).
MIT License
28 stars 6 forks source link

Conflict with search panel and save_on_focus_lost #15

Open GreenLightning opened 4 years ago

GreenLightning commented 4 years ago

There is a conflict with the search panel if the setting save_on_focus_lost is enabled, where the search panel will not show up the first time CTRL+F is pressed.

Steps to reproduce:

  1. Set "save_on_focus_lost": true, in Sublime preferences.
  2. Open a go file and make some unsaved changes.
  3. Press CTRL+F.

I think Sublime Text opens the search panel, which means the editor loses focus, which triggers a save, which triggers the gofmt plugin, which closes the search panel somehow.

Pressing CTRL+F a second time will then work, because there are no unsaved changes.