#3 Fix RUN command being typed while in menu in some models

Open
pgimeno wants to merge 3 commits from pgimeno/pg-fix-autorun into pgimeno/master

Some models use the H_READ hook for displaying the menu, and since the old code used this hook to type, the text was incorrectly typed while in the menu.

The H_MAIN hook is executed in many occasions, the first one being right after H_READ, and indicates that the interpreter is ready. This doesn't happen during the menus, therefore a viable strategy is to type the text on the first call to H_MAIN after an H_READ.

Uses typing via the keybuf, to avoid the need for the previous complex handling of multiple commands used for CLOAD followed by RUN, because we encode both lines in one single send.

Also fixes problems when the line was not empty to start with, by clearing it before typing.

Some models use the H_READ hook for displaying the menu, and since the old code used this hook to type, the text was incorrectly typed while in the menu. The H_MAIN hook is executed in many occasions, the first one being right after H_READ, and indicates that the interpreter is ready. This doesn't happen during the menus, therefore a viable strategy is to type the text on the first call to H_MAIN after an H_READ. Uses typing via the keybuf, to avoid the need for the previous complex handling of multiple commands used for CLOAD followed by RUN, because we encode both lines in one single send. Also fixes problems when the line was not empty to start with, by clearing it before typing.
This pull request can be merged automatically.
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.