diff options
| author | bptato <nincsnevem662@gmail.com> | 2022-07-25 18:42:24 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2022-07-25 18:42:24 +0200 |
| commit | 7469a7428807d2ffff0000d54d12e209a189d973 (patch) | |
| tree | bb36c12400e475d7249404c422dbbac7ff8b84a7 /src/strings | |
| parent | fce9adc58cc762d6f70c1d34ac97efddd171edc7 (diff) | |
| download | chawan-7469a7428807d2ffff0000d54d12e209a189d973.tar.gz | |
Incremental search fixes
Diffstat (limited to 'src/strings')
| -rw-r--r-- | src/strings/charset.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings/charset.nim b/src/strings/charset.nim index 8726268a..4b293b95 100644 --- a/src/strings/charset.nim +++ b/src/strings/charset.nim @@ -39,7 +39,7 @@ template fastRuneAt*(s: string16, i: int, r: untyped, doInc = true, be = false) else: var c1: uint32 = uint32(s[i]) + (uint32(s[i + 1]) shl 8) if c1 >= 0xD800 or c1 < 0xDC00: - if i + 3 == s.len: + if i + 2 == s.len or i + 3 == s.len: when doInc: i += 2 r = Rune(c1) # unmatched surrogate else: |