Hi everyone,
I’m currently writing a small plugin that can run shell and perl scripts. Some of them work on the selection, which works pretty good. But I have some that work on the file itself, which basically also works, but doesn’t trigger a refresh/reload of the file in the view. Sometimes I get asked to reload it, sometimes opening and closing the console triggers the reload, but it seems to be undeterministic.
While googling I saw the info that running run_command(‘revert’) would work, but not when an Edit is active. But I don’t see a way to have the Edit not active, because the scripts working on the selection need an active edit to perform the replace of the selection.
Any ideas how to deterministically trigger a “refresh” or “revert”?
Cheers,
Manuel