mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:37:35 +00:00
LibGUI: Select last word when double clicking at the end of a line
Fixes #6565.
This commit is contained in:
parent
c2f936b14c
commit
2d6be48c6f
1 changed files with 5 additions and 1 deletions
|
@ -628,7 +628,11 @@ TextPosition TextDocument::first_word_break_before(const TextPosition& position,
|
||||||
|
|
||||||
auto target = position;
|
auto target = position;
|
||||||
auto line = this->line(target.line());
|
auto line = this->line(target.line());
|
||||||
auto is_start_alphanumeric = isalnum(line.code_points()[target.column() - (start_at_column_before ? 1 : 0)]);
|
auto modifier = start_at_column_before ? 1 : 0;
|
||||||
|
if (target.column() == line.length())
|
||||||
|
modifier = 1;
|
||||||
|
|
||||||
|
auto is_start_alphanumeric = isalnum(line.code_points()[target.column() - modifier]);
|
||||||
|
|
||||||
while (target.column() > 0) {
|
while (target.column() > 0) {
|
||||||
auto prev_code_point = line.code_points()[target.column() - 1];
|
auto prev_code_point = line.code_points()[target.column() - 1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue