From ba3af8fb64f6f7bdcfa462b79edf502b8cbadc7c Mon Sep 17 00:00:00 2001 From: Alejandro Huertas Herrero Date: Thu, 27 Jun 2019 12:26:36 +0200 Subject: [PATCH] F #688: fix bug in CLI top (#3459) --- src/cli/cli_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli/cli_helper.rb b/src/cli/cli_helper.rb index 270ae2e4dc..65c1862861 100644 --- a/src/cli/cli_helper.rb +++ b/src/cli/cli_helper.rb @@ -367,6 +367,7 @@ module CLIHelper # @param options [Hash] Object with CLI user options def top(options = {}) delay = options[:delay] || 1 + top = false begin loop do @@ -375,9 +376,11 @@ module CLIHelper CLIHelper.scr_cls CLIHelper.scr_move(0, 0) - show(data, options, true) + show(data, options, top) sleep delay + + top = true end rescue SystemExit, Interrupt, StandardError => e CLIHelper.fail(e.message)