From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 28 Oct 2020 23:06:07 +0000 (+0100)
Subject: Fix input backspace bug.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/edit?a=commitdiff_plain;h=8c88fd160e5401f659b0b74386a127248c6ad8f4;p=plomrogue2-experiments

Fix input backspace bug.
---

diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index 14668ea..32a3781 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -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);