fix: Double-clicking a string selects the closing double quotes (#1862)
This is a simple fix for a simple issue. Just check if the last char in the selection is a double quote and if it is, make the selection one char shorter. --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
parent
e0b4931a54
commit
414e7d36a0
@ -392,8 +392,13 @@ TextEditor::Coordinates TextEditor::FindWordEnd(const Coordinates &aFrom) const
|
||||
while (cindex < (line.size()) && !isWordChar(line[cindex].mChar))
|
||||
++cindex;
|
||||
|
||||
while (cindex < (line.size()) && isWordChar(line[cindex].mChar))
|
||||
++cindex;
|
||||
if (prevspace != !!isspace(c)) {
|
||||
if (isspace(c))
|
||||
while (cindex < (int)line.size() && isspace(line[cindex].mChar))
|
||||
++cindex;
|
||||
break;
|
||||
}
|
||||
cindex += d;
|
||||
|
||||
if (line[cindex-1].mChar == '\"')
|
||||
--cindex;
|
||||
|
Loading…
Reference in New Issue
Block a user