When the last window opened was a graph window (or other windows than the main one) the plugin might try to send the code to that window instead and the code doesn't evaluate. With this fix it behaves more consistently.
Note: Only tested with Stata16-SE, so it might be good to try out with other flavors first.
note 2: this is my first pull request... If I am doing something wrong, I will be happy to hear how I could do properly.
When the last window opened was a graph window (or other windows than the main one) the plugin might try to send the code to that window instead and the code doesn't evaluate. With this fix it behaves more consistently.
Note: Only tested with
Stata16-SE
, so it might be good to try out with other flavors first. note 2: this is my first pull request... If I am doing something wrong, I will be happy to hear how I could do properly.