Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with cursor positioning at the end of the line #9345

Closed
2 tasks done
Branikolog opened this issue Dec 15, 2024 · 3 comments · Fixed by #9355
Closed
2 tasks done

Issue with cursor positioning at the end of the line #9345

Branikolog opened this issue Dec 15, 2024 · 3 comments · Fixed by #9355
Assignees
Labels
bug Something doesn't work ui UI/GUI related stuff
Milestone

Comments

@Branikolog
Copy link
Collaborator

Preliminary checks

Platform

Windows

Describe the bug

I found several issues with cursor positioning while clicking near the end of the line:

2024-12-15.15-36-44.mp4
2024-12-15.15-37-17.mp4

For tests I've used the latest version (after merging #9319 )

Save file

None.

Additional info

No response

@Branikolog Branikolog added bug Something doesn't work ui UI/GUI related stuff labels Dec 15, 2024
@Branikolog Branikolog added this to the 1.2.0 milestone Dec 15, 2024
@Branikolog Branikolog changed the title Issue with cursor positioning for the end of the line Issue with cursor positioning at the end of the line Dec 15, 2024
@ihhub
Copy link
Owner

ihhub commented Dec 18, 2024

Hi @Districh-ru , could you please take a look at this issue?

@Districh-ru Districh-ru self-assigned this Dec 18, 2024
@Districh-ru
Copy link
Collaborator

Hi, @Branikolog, could you please upload a map with this test text if you have saved it because I'm not able to quickly reproduce the second bug. :(

fheroes2.2024-12-18.16-47-30-242.mp4

The first bug is not certainly a bug - you click on a character to place a cursor on it's place and it is placed right before this character. And in such long line there is no empty place to consider it as the area after the line end. In my video there is only one pixel at the line end and when you click it the cursor places really at the end of the line.
Maybe we should expand the click area in this dialog in future...
In future we could update the logic to place cursor after the character if you press on the right half of it, but it is more tricky. :)

@Branikolog
Copy link
Collaborator Author

Hello, @Districh-ru !
Here's the map, where I could reproduce both issues. I believe the first issue occurs for the lines with a certain length. I've noticed, that because of blinking cursor one symbol jumps back and forth between lines, depending on the presence of the cursor. Sometimes I can select press the end of the line, but sometimes it's impossible, depending on the overall symbols width. I think, we should shorten the line a bit, so the last symbol does not jump on the next line.

Map 01.zip
The text is in the events field.
image
(the issues occur on both long lines in the reverse order: Cyrillic symbols - second issue, Latin symbols - first issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something doesn't work ui UI/GUI related stuff
Projects
None yet
3 participants