Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

End key to jump to end of the line sometimes doesn't work properly #5517

Closed pintassilgo closed 1 month ago

pintassilgo commented 1 month ago

I will add more info later when I get reliable steps to reproduce from clean profile. but first tests suggests HiOccur and enabled word-wrap might be involved.

It's something like this: I search for a word, then press Enter, then Esc to move focus back to editor, then press End. Sometimes, instead of jumping to the end of the line, it jumps a few chars before. Sometimes I need to do it twice to reproduce, because the first time it jumps to the end.

For instance, this line:

    "key_end_to_nonspace": false,

I searched for key_end_to_nonspace. When I press End, it jumps to fa|lse, where | is the caret.

Other example:

    "minimap_tooltip_show": true,

Searched for minimap_tooltip_show, End jumps to t|rue.

Alexey-T commented 1 month ago

I see in the code the 'bad part', I will rework it today.

Alexey-T commented 1 month ago

Beta updated. I did not repro, but maybe fixed.

Alexey-T commented 1 month ago

Try to reproduce other effects in the same cases: e.g. mouse click near the line end may put caret to wrong pos?

pintassilgo commented 1 month ago

Looks fixed, thanks!

I see no issue in caret position on click.