JennyKmu / ROSE

A program to read, edit, and write save files for the game Railroads! Online
GNU General Public License v3.0
20 stars 3 forks source link

Cursor overflow #24

Closed JennyKmu closed 2 years ago

JennyKmu commented 2 years ago

When there is exactly 10 items in a menu, there is some interaction with cursor movement making it possible to go to 11th line (causing an error if trying to edit there)

Leif-The-Head commented 2 years ago

Which menu exactly? Or all of them? I already have an idea why this happens.

JennyKmu commented 2 years ago

It happened in the test save you sent me when editing loco/tender contents (since in that menu you get exactly 10 lines, which is the limit for multi-page display. I suspect it will do the same for all menus since they rely on the same structure. The fix isn't too complicated since there's a Boolean which determines whether the lines are split into pages or not. So simply making page-up and page-do to not do anything if that bool is False should solve the issue (haven't had a chance to do it yet)

JennyKmu commented 2 years ago

This issue will be corrected along with the reworked terminal user interface.