about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-19 17:45:58 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-19 17:45:58 +0100
commit21e30acaaf8b16afc4730f0355c6b32618b3003a (patch)
tree335e78df969ff617b8c1fd2248ce039f8870a010 /src/utils
parent657665d642fee3eea9c1a6f22b4f9488c17ecf9c (diff)
downloadchawan-21e30acaaf8b16afc4730f0355c6b32618b3003a.tar.gz
Fix cursorPrevWord, cursorNextWord
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 47d2c16f..9e88b9cd 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -110,9 +110,13 @@ const lowerChars = getLowerChars()
 func tolower*(c: char): char =
   return lowerChars[int(c)]
 
+func getrune(s: string): Rune =
+  return s.toRunes()[0]
+
 const breakWord = [
   Rune('\n'), Rune('/'), Rune('\\'), Rune(' '), Rune('&'), Rune('='),
-  Rune('?'), Rune('.'), Rune(';')
+  Rune('?'), Rune('.'), Rune(';'), "。".getrune(), "、".getrune(),
+  "「".getrune(), "」".getrune()
 ]
 
 func genHexCharMap(): seq[int] =