Improve ctrl deletes
This commit is contained in:
@@ -405,7 +405,7 @@ CharClass GetCharClass(char16_t c) {
|
||||
API Int OnCharClassBoundary_GetNextWordEnd(Buffer *buffer, Int pos) {
|
||||
Int i = Clamp(pos, (Int)0, buffer->len);
|
||||
|
||||
while (i < buffer->len && GetCharClass(buffer->str[i]) == CharClass_Whitespace) {
|
||||
if (i < buffer->len && GetCharClass(buffer->str[i]) == CharClass_Whitespace) {
|
||||
i += 1;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ API Int OnCharClassBoundary_GetPrevWordStart(Buffer *buffer, Int pos) {
|
||||
pos = Clamp(pos, (Int)0, buffer->len);
|
||||
Int i = pos - 1;
|
||||
|
||||
while (i >= 0 && GetCharClass(buffer->str[i]) == CharClass_Whitespace) {
|
||||
if (i >= 0 && GetCharClass(buffer->str[i]) == CharClass_Whitespace) {
|
||||
i -= 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user