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:
@@ -624,6 +624,8 @@ win_clear(ProfWin *window)
|
|||||||
{
|
{
|
||||||
if (!prefs_get_boolean(PREF_CLEAR_PERSIST_HISTORY)) {
|
if (!prefs_get_boolean(PREF_CLEAR_PERSIST_HISTORY)) {
|
||||||
werase(window->layout->win);
|
werase(window->layout->win);
|
||||||
|
buffer_free(window->layout->buffer);
|
||||||
|
window->layout->buffer = buffer_create();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user