[Github-comments] [geany/geany] geany F5 trouble (command works only the first time) (#2738)

elextr notifications at xxxxx
Thu Jan 28 21:55:51 UTC 2021


Ahh, you are talking about running in the embedded terminal widget (VTE), that wasn't clear from the screenshot and your listing konsole as the terminal.

This is a different problem, Geany just sends a command to VTE, it doesn't run the command, and VTE doesn't run the command either, the shell already running inside it does, and that does not have a way of communicating the process ID back to VTE for it to communicate it back to Geany, so neither VTE nor Geany can wait on completion since they do not know which process ID to wait on.  So Geany doesn't wait for completion when running in VTE and the execute icon will never change to kill as Geany has no idea which process ID to kill.

But the user can also type into the VTE widget, and as Geany can't remove those characters, any stray characters will get appended to the command.  So there is the concept of the terminal being "clean", where to the best of Geany's knowledge nothing has been typed in VTE since the last command or enter or ctrl+c, all of which should cause any input to be consumed/ignored by the shell.  If VTE isn't "clean" Geany asks you to clean it before it will attempt to run the command and confirm by enter or ctrl+c.  But this is a bit of a heuristic, its not perfect.

For me it works the way you would like. F5, program runs and finishes, F5, program runs and finishes.

There is a keybinding to switch to the VTE (bound to F4 by default) and there is a keybinding to switch to the editor (bound to F2 by default).  But within VTE only the minimal keybindings work, to avoid stealing them from the program running there which may use them.  IIRC the (default F2) switch to editor is one of the few that work and F5 deliberately doesn't along with most of the other keybindings.

For me a program that needs user input works as F5, program runs until input needed, F4, type input, enter, program completes, F2, F5 ... rinse and repeat.

So your continual need to clean VTE means somehow you are getting VTE "unclean" by typing in VTE between commands.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2738#issuecomment-769425038
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210128/16d325c1/attachment.htm>


More information about the Github-comments mailing list