diff options
author | bptato <nincsnevem662@gmail.com> | 2024-07-07 22:15:16 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-07-07 22:15:16 +0200 |
commit | 42563d12fe70f8eaa4c765940e9bcaebf213c1cb (patch) | |
tree | f6c307b82124397bb4de056124a94cd75dbdc63b /src | |
parent | a5f98a151207ffe823a8024721e37e320d97f241 (diff) | |
download | chawan-42563d12fe70f8eaa4c765940e9bcaebf213c1cb.tar.gz |
lineedit: small cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/local/lineedit.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/local/lineedit.nim b/src/local/lineedit.nim index 17b343aa..ecfc3db8 100644 --- a/src/local/lineedit.nim +++ b/src/local/lineedit.nim @@ -128,10 +128,7 @@ proc insertCharseq(edit: LineEdit; s: string) = edit.escNext = false if s.len == 0: return - let rem = edit.news.substr(edit.cursori) - edit.news.setLen(edit.cursori) - edit.news &= s - edit.news &= rem + edit.news.insert(s, edit.cursori) edit.cursori += s.len edit.cursorx += s.notwidth() edit.redraw = true |