Sublime Forum

No output panel when exec called from input panel

#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.

Below is the code I’m using. Does it need to be modified or is this a bug?

class GhcExpressionCommand(sublime_plugin.TextCommand): 
    def run(self, edit):
        self.view.window().run_command("save")
        runexpr = lambda e: self.view.window().run_command("exec", {"cmd": "ghc.exe -e " + e})
        self.view.window().show_input_panel("Evaluate:", self.view.substr(self.view.sel()[0]), runexpr, lambda s:s, 0)
0 Likes