Cannot use edit object in `show_quick_panel` callback ST is very finicky about edit objects and how long you can keep them around. It looks like the callbacks of `show_quick_panel` are probably not called in the same context as the text command itself, so you cannot use the edit object from within the callback. The solution is to use `run_command` to run another text command for performing the edit once the function has been selected.
Cannot use edit object in `show_quick_panel` callback
ST is very finicky about edit objects and how long you can keep them
around. It looks like the callbacks of `show_quick_panel` are
probably not called in the same context as the text command itself,
so you cannot use the edit object from within the callback. The
solution is to use `run_command` to run another text command for
performing the edit once the function has been selected.

apiad/Sublime-InlinePython,apiad/Sublime-InlinePython