home · contact · privacy
Fix input backspace bug.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 28 Oct 2020 23:06:07 +0000 (00:06 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 28 Oct 2020 23:06:07 +0000 (00:06 +0100)
new2/rogue_chat_nocanvas_monochrome.html

index 14668eaa6c015e1b3e5c483c16600f007d53c63d..32a3781161f622a21d09c574843f75378454b2e2 100644 (file)
@@ -234,10 +234,8 @@ let tui = {
       this.height_input = this.input_lines.length;
   },
   shorten_input: function() {
-      if (this.input.length > 2) {
-          this.input = tui.input.slice(0, -1);
-          this.recalc_input_lines();
-      }
+      this.input = tui.input.slice(0, -1);
+      this.recalc_input_lines();
   },
   draw_input: function() {
     terminal.drawBox(terminal.rows - this.height_input, this.window_width, this.height_input, this.window_width);