From a3b2d9189f3b25c7cf79985beac843cc46c37cfc Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 16 Dec 2023 18:30:03 +0100 Subject: strwidth & url fixes * actually search Combining for isCombining * fix searchInMap * fix cmpRange of url --- src/utils/map.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils/map.nim') 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 ) -- cgit 1.4.1-2-gfad0