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

UI exception on selected text in textbox #229

Open
ColinPitrat opened this issue Oct 12, 2022 · 1 comment
Open

UI exception on selected text in textbox #229

ColinPitrat opened this issue Oct 12, 2022 · 1 comment
Labels

Comments

@ColinPitrat
Copy link
Owner

When selecting text across lines in multiline text in a textbox and unselecting from the right, an exception is raised when reaching the beginning of the line.

At the time of writing, this happens in:

#4  0x0000555555660e82 in wGui::CTextBox::Draw (this=0x55555613bc00) at src/gui/src/wg_textbox.cpp:242          
242                                                     SelRect.SetRight(vCharRects.at(CurLine).at(SelEndPoint.XPos() - 1).Right() +    

This code is wrong because it should handle selection at the char level. On the other hand, it's probably necessary to keep coordinates of selection for movements up and down.

@ColinPitrat
Copy link
Owner Author

Note: this is not a big deal because unless I'm mistaken, we don't use an editable textbox anywhere in Caprice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant