diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2023-05-02 22:04:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-02 22:04:44 +0100 |
| commit | dfb5f8ea2cf219d6da5bd540a63b04f81f1fa7f1 (patch) | |
| tree | 50a3e45ecd6b5d907e72073de66c4f09449a41e9 | |
| parent | 67a1e6e46a246faace0fe3e79ba73802cc7651a4 (diff) | |
| parent | 02eab95dd126b873385c112b4946848f17befcd9 (diff) | |
Merge pull request #2507 from powerc9000/patch-5
Fix check for continuation byte in core/text/text_edit
| -rw-r--r-- | core/text/edit/text_edit.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/text/edit/text_edit.odin b/core/text/edit/text_edit.odin index b53e2f8bc..c49a5d0d1 100644 --- a/core/text/edit/text_edit.odin +++ b/core/text/edit/text_edit.odin @@ -219,7 +219,7 @@ selection_delete :: proc(s: ^State) { translate_position :: proc(s: ^State, pos: int, t: Translation) -> int { is_continuation_byte :: proc(b: byte) -> bool { - return b <= 0x80 && b < 0xc0 + return b >= 0x80 && b < 0xc0 } is_space :: proc(b: byte) -> bool { return b == ' ' || b == '\t' || b == '\n' @@ -410,4 +410,4 @@ perform_command :: proc(s: ^State, cmd: Command) { case .Select_Line_Start: select_to(s, .Soft_Line_Start) case .Select_Line_End: select_to(s, .Soft_Line_End) } -}
\ No newline at end of file +} |