Skip to content

Commit

Permalink
Redraw screen after entry of PGP secret key
Browse files Browse the repository at this point in the history
After specifying the PGP key ID with pgp.keyid within the accounts file on startup profanity asks for the secret key passphrase. It then doesn't redraw the screen, leaving it in an odd looking state.

This probably only happens with pinentry-curses since it draws in
screen.

We need this fix for cli only environments.

Fixes #906 reported by Bob
Mottram.
Based on #908 by Bob Mottram

Bob removed his GitHub account, so GitHub created a ghost placeholder
user for him, which unfortunately makes it impossible to cherry-pick
this commit. To more or less preserve authorship I added him as
co-author.

Commit picked and message edited by jubalh.

Co-authored-by: Bob Mottram <bob@freedombone.net>
  • Loading branch information
jubalh and Bob Mottram committed Feb 20, 2019
1 parent 289b05e commit 6034b83
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/event/server_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ sv_ev_roster_received(void)
cons_show_error("Invalid PGP key ID specified: %s, %s", account->pgp_keyid, err_str);
}
free(err_str);

// Redraw the screen after entry of the PGP secret key
ProfWin *win = wins_get_current();
char *theme = prefs_get_string(PREF_THEME);
win_clear(win);
theme_init(theme);
prefs_free_string(theme);
ui_init();
ui_resize();
ui_show_roster();
}
account_free(account);
#endif
Expand Down

0 comments on commit 6034b83

Please sign in to comment.