diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config/preferences.c | 3 | ||||
-rw-r--r-- | src/config/preferences.h | 1 | ||||
-rw-r--r-- | src/ui/window.c | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index fc755bff..c7196ef5 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1646,6 +1646,7 @@ _get_group(preference_t pref) { switch (pref) { + case PREF_CLEAR_PERSIST_HISTORY: case PREF_SPLASH: case PREF_BEEP: case PREF_THEME: @@ -1773,6 +1774,8 @@ _get_key(preference_t pref) { switch (pref) { + case PREF_CLEAR_PERSIST_HISTORY: + return "clear.persist_history"; case PREF_SPLASH: return "splash"; case PREF_BEEP: diff --git a/src/config/preferences.h b/src/config/preferences.h index 1a6250a4..f000fa5b 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -46,6 +46,7 @@ // represents all settings in .profrc // each enum value is mapped to a group and key in .profrc (see preferences.c) typedef enum { + PREF_CLEAR_PERSIST_HISTORY, PREF_SPLASH, PREF_BEEP, PREF_VERCHECK, diff --git a/src/ui/window.c b/src/ui/window.c index 49164769..c1624a50 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -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); } |