about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/display/lineedit.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display/lineedit.nim b/src/display/lineedit.nim
index 53223be9..bcca28fe 100644
--- a/src/display/lineedit.nim
+++ b/src/display/lineedit.nim
@@ -186,8 +186,8 @@ proc clear(edit: LineEdit) {.jsfunc.} =
     edit.invalid = true
 
 proc kill(edit: LineEdit) {.jsfunc.} =
-  if edit.cursori > 0 and edit.cursori < edit.news.len:
-    edit.news.setLen(edit.cursori - 1)
+  if edit.cursori < edit.news.len:
+    edit.news.setLen(edit.cursori)
     edit.invalid = true
 
 proc backward(edit: LineEdit) {.jsfunc.} =