+2
Falcon NL 7 years ago • updated by Alexander S. 6 years ago 1
In ST1 I had a keyboard shortcut when working with Haskell that brought up the input panel, evaluated the expression in GHC with the exec command and showed the result in the output panel. In ST2, it doesn't show the output panel anymore, though the exec command is still called, as can be seen from the console messages.

Forum topic: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=1538
This is a bug. It turns out that if you open an input panel, then any output panel or "quick panel" will be immediately closed after the onDone callback is executed.


Here's an example command that reproduces the behaviour. When you type something and hit enter, the quick panel will be displayed briefly, and will then disappear.


class TestCommand(sublime_plugin.TextCommand):

  def run(self, edit):

    self.view.window().show_input_panel("Type stuff:", "",

      lambda s: self.on_done(s), None, None)


  def on_done(self, s):

    self.view.window().show_quick_panel(["one", "two", "three"], None)