metomi / rose

:rose: Rose is a toolkit for writing, editing and running application configurations.
https://metomi.github.io/rose/
GNU General Public License v3.0
56 stars 53 forks source link

edit: Keystrokes ignored when editing python_list items #2091

Open oliver-sanders opened 7 years ago

oliver-sanders commented 7 years ago

Bug

Error occurs when a string outgrows its entry causing the box to expand. During this process it appears that only one keystroke may be registered.

Appears to pertain only to the python_list data type.

Occurs in normal typing, is especially evident when typing quickly and when pasting text.

Steps to reproduce:

rose-app.conf

[env]
VAR = ["some longish string", "b", "c"]

meta/rose-meta.conf

[env=VAR]
type = python_list

In rose edit, edit the first item of the list by copying the text then pasting a few times until the entry is forced to grow.

jfrost-mo commented 2 months ago

(From https://github.com/astroDimitrios/rose/issues/32)

This is an issue that afflicts the rose edit 2019 as well as the rose edit python 3 version. Typing in the text box of a python list widget is really laggy, and often misses typed characters.

I suspect this is because it is reparsing the python list on every keypress, where is should really wait until the focus leaves the text box to do that, or at least have some kind of debouncing timeout. Fixing this would also help lessen the impact of https://github.com/metomi/rose/issues/2812.

I suspect this is a Rose 2019 issue so not really one for the porting project. Should be relatively easy to jam in a debounce (something along the lines of https://stackoverflow.com/a/78227581). - Oliver

oliver-sanders commented 2 months ago

(the debounce suggestion is a good idea that might have application elsewhere too)