diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-16 18:30:03 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-16 18:30:03 +0100 |
commit | a3b2d9189f3b25c7cf79985beac843cc46c37cfc (patch) | |
tree | 7b371adff64309f98edcf8115eba6461a9c3bce0 /src/utils/map.nim | |
parent | 3f2bc1069142ae13f9991102a0c01cd1291b08e8 (diff) | |
download | chawan-a3b2d9189f3b25c7cf79985beac843cc46c37cfc.tar.gz |
strwidth & url fixes
* actually search Combining for isCombining * fix searchInMap * fix cmpRange of url
Diffstat (limited to 'src/utils/map.nim')
-rw-r--r-- | src/utils/map.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/map.nim b/src/utils/map.nim index 2a3515a1..620dec58 100644 --- a/src/utils/map.nim +++ b/src/utils/map.nim @@ -11,10 +11,10 @@ func isInMap*[U, T](a: openArray[(U, T)], u: U): bool = func isInRange*[U](a: openArray[(U, U)], u: U): bool = let res = binarySearch(a, u, proc(x: (U, U), y: U): int = - if x[0] < y: - -1 - elif x[1] > y: + if x[0] > y: 1 + elif x[1] < y: + -1 else: 0 ) |