Blame SOURCES/0008-daemonized-mode-fix-issues-noticed-with-curser-posit.patch

e40f95
From 3cfd45bb22cdcb1512228c3f8101a1e3f74af3ee Mon Sep 17 00:00:00 2001
e40f95
From: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
e40f95
Date: Mon, 6 Apr 2020 16:05:56 +0530
e40f95
Subject: [PATCH 2/3] daemonized-mode: fix issues noticed with curser position
e40f95
e40f95
* get/set x and y postions of the curser dynamically
e40f95
* skip accepting command if no command is provided
e40f95
  eg: just hit enter with no command
e40f95
e40f95
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
e40f95
---
e40f95
 scripts/targetcli | 4 ++++
e40f95
 1 file changed, 4 insertions(+)
e40f95
e40f95
diff --git a/scripts/targetcli b/scripts/targetcli
e40f95
index 3496126..97f41eb 100755
e40f95
--- a/scripts/targetcli
e40f95
+++ b/scripts/targetcli
e40f95
@@ -192,9 +192,13 @@ def switch_to_daemon(shell, interactive):
e40f95
     real_exit=False
e40f95
     while True:
e40f95
         shell.con.raw_write("/> ")
e40f95
+        pos = shell.con.get_cursor_xy()
e40f95
+        shell.con.set_cursor_xy(pos[0], pos[1])
e40f95
         command = six.moves.input()
e40f95
         if command.lower() == "exit":
e40f95
             real_exit=True
e40f95
+        elif not command:
e40f95
+            continue
e40f95
         if not interactive:
e40f95
             inputs.append(command)
e40f95
             if real_exit:
e40f95
-- 
e40f95
2.21.0
e40f95