summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHugo Wallenburg <[email protected]>2020-07-22 14:18:41 +0200
committerAmir Rajan <[email protected]>2020-07-26 16:22:28 -0500
commit9596c21a60a21a47dd214e8aab531131f84cb3dd (patch)
tree5ead47dbfd4f7acd9abaf726c71c1f2bca119b67
parenta1c04fad6a8752a5652d829cd1927d30e696f999 (diff)
downloaddragonruby-game-toolkit-contrib-9596c21a60a21a47dd214e8aab531131f84cb3dd.tar.gz
dragonruby-game-toolkit-contrib-9596c21a60a21a47dd214e8aab531131f84cb3dd.zip
Allows editing old history commands
-rw-r--r--dragon/console.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/dragon/console.rb b/dragon/console.rb
index 5d5bd93..b257265 100644
--- a/dragon/console.rb
+++ b/dragon/console.rb
@@ -410,7 +410,7 @@ S
end
if @command_history_index < (@command_history.length - 1)
@command_history_index += 1
- self.current_input_str = @command_history[@command_history_index].clone
+ self.current_input_str = @command_history[@command_history_index].dup
end
elsif args.inputs.keyboard.key_down.down
if @command_history_index == 0
@@ -419,7 +419,7 @@ S
@nonhistory_input = ''
elsif @command_history_index > 0
@command_history_index -= 1
- self.current_input_str = @command_history[@command_history_index].clone
+ self.current_input_str = @command_history[@command_history_index].dup
end
elsif inputs_scroll_up_full? args
scroll_up_full