From 3b662090fc93a2a99ac33e9d53a28b4cb5d4905c Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Thu, 8 Aug 2019 20:34:18 -0500 Subject: [PATCH] Fixed Console erasing input when pressing down arrow key --- lib/ui/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/console.rb b/lib/ui/console.rb index d5965da..25e2615 100644 --- a/lib/ui/console.rb +++ b/lib/ui/console.rb @@ -80,8 +80,8 @@ class IMICFPS when Gosu::KbDown @command_history_index += 1 if @command_history_index > @command_history.size - 1 + @text_input.text = "" unless @command_history_index > @command_history.size @command_history_index = @command_history.size - @text_input.text = "" else @text_input.text = @command_history[@command_history_index] end