about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2023-04-02 17:48:51 +0300
committerMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2023-04-02 21:53:12 +0300
commitce688f6737dd972d919da80f2f5870372cd08aab (patch)
treec9a09a59c1c6f0630f9bc7a9e398bee85b352537
parentf2c83fa8ceea29e295509c8b964f1e9ccda2f0e4 (diff)
downloadprofani-tty-ce688f6737dd972d919da80f2f5870372cd08aab.tar.gz
Fix empty window after reconnect
Sometimes after a reconnect the current window would get cleared. This
was a deliberate change to fix the profanity window looking all garbled
up after providing the passphrase for a gpg key using pinentry-curses.

Fixes https://github.com/profanity-im/profanity/issues/1556
-rw-r--r--src/event/server_events.c2
-rw-r--r--tests/unittests/ui/stub_ui.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index eb3e96e7..c1f11332 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -160,7 +160,7 @@ sv_ev_roster_received(void)
         // Redraw the screen after entry of the PGP secret key, but not init
         ProfWin* win = wins_get_current();
         char* theme = prefs_get_string(PREF_THEME);
-        win_clear(win);
+        win_redraw(win);
         theme_init(theme);
         g_free(theme);
         ui_resize();
diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c
index edd8c336..608f5003 100644
--- a/tests/unittests/ui/stub_ui.c
+++ b/tests/unittests/ui/stub_ui.c
@@ -1367,6 +1367,10 @@ void
 win_clear(ProfWin* window)
 {
 }
+void
+win_redraw(ProfWin* window)
+{
+}
 char*
 win_to_string(ProfWin* window)
 {