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

Відкрити
pgimeno хоче злити 3 комітів з pgimeno/pg-fix-autorun до pgimeno/master
Pedro Gimeno відкоментовано 4 роки тому

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.
Цей запрос може бути влитий автоматично.
Підпишіться щоб приєднатися до обговорення.
Без Мітки
Етап відсутній
Немає відповідального
1 учасників
Завантажується...
Скасувати
Зберегти
Тут ще немає жодного вмісту.