mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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
Notes:
sideshowbarker
2024-07-18 19:05:33 +09:00
Author: https://github.com/Sauler Commit: https://github.com/SerenityOS/serenity/commit/2d6be48c6f2 Pull-request: https://github.com/SerenityOS/serenity/pull/6559 Issue: https://github.com/SerenityOS/serenity/issues/6565
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 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) {
|
||||
auto prev_code_point = line.code_points()[target.column() - 1];
|
||||
|
|
Loading…
Reference in a new issue