1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Clear buffer upon /clear

I think both the window and the buffer should also be cleared in case
`/clear` is issue and persist_history is off.

Otherwise it could happen that win_redraw() redraws the whole content of
the buffer again.
This commit is contained in:
Michael Vetter 2020-02-07 15:52:24 +01:00
parent 7df964fe7b
commit 772224421d

View File

@ -624,6 +624,8 @@ win_clear(ProfWin *window)
{
if (!prefs_get_boolean(PREF_CLEAR_PERSIST_HISTORY)) {
werase(window->layout->win);
buffer_free(window->layout->buffer);
window->layout->buffer = buffer_create();
return;
}