Merge pull request #874 from spiridoncha/master

Change /clear behaviour. Closes issue #855.
This commit is contained in:
Michael Vetter
2019-10-05 15:12:44 +02:00
committed by GitHub
3 changed files with 13 additions and 1 deletions

View File

@@ -620,7 +620,15 @@ win_sub_page_up(ProfWin *window)
void
win_clear(ProfWin *window)
{
werase(window->layout->win);
if (!prefs_get_boolean(PREF_CLEAR_PERSIST_HISTORY)) {
werase(window->layout->win);
return;
}
int y = getcury(window->layout->win);
int *page_start = &(window->layout->y_pos);
*page_start = y;
window->layout->paged = 1;
win_update_virtual(window);
}