vgmoose / vgedit

SDL text editor for homebrew'd video game consoles, with controller and touch screen support
GNU General Public License v3.0
71 stars 4 forks source link

Cursor position desync of Switch #1

Closed ZornTaov closed 4 years ago

ZornTaov commented 5 years ago

for whatever reason for files that extend past the bottom of the screen if you scroll down to the bottom of the file the screen doesn't move in line with the movement of the screen, so on large files the cursor will be off by a few lines from where it actually is in the file. 2019031906150000-E4B364C957D95017CA1171810D655865

rsn8887 commented 5 years ago

I have this problem even for simple small files with 5 lines. Unless you want to edit line 1,2 or 3 in your file, the cursor will be shifted so much it will be very hard to tell which line you are editing.

vgmoose commented 5 years ago

problem is with line wrapping– I haven't had time to address this in a satisfying way, since I'm using the built-in SDL line wrapping to render the entire blob of text all at once. I think a good fix would re-render every line individually, and increase offsets if I detect that a previous line has wrapped.

as always the project is open to contribution, but many devs don't seem to be that interested. For simple non-wrapping files it's better than nothing and I've used it many times for this purpose

vgmoose commented 4 years ago

It's been a while, but the 2.0 release has a lot of improvements in this area! It can now handle larger files with line wrapping, and accurately positions the cursor.

New release changelog: https://github.com/vgmoose/vgedit/releases