nojanath / SublimeKSP

Fork of Nils Liberg's SublimeKSP plugin. See README for details.
GNU General Public License v3.0
89 stars 19 forks source link

Add option "Sanitize behavior of 'exit' function" #299

Closed mkruselj closed 1 year ago

mkruselj commented 1 year ago

In vanilla KSP, when exit function is called directly after function and while statements (possibly in other cases, too), it would actually bail out of ALL nested function calls instead of just the one in which it was invoked in.

This is a very old bug (probably been there forever), and Nils Liberg found a workaround for it, which just consists of adding a dummy noop like dummy := dummy before actually calling exit.

Add an option to do exactly this whenever exit is found following the aforementioned statements. Make it enabled by default.