diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-10-05 15:12:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-05 15:12:44 +0200 |
commit | d7c00360ea4a15233b46ddf59f05434f705eadae (patch) | |
tree | f85ea3d9da11722e2205bff3c9e22112ecd55a51 /src/ui/window.c | |
parent | 4637a7a23bdba9085a2772152b73342d7a6ff679 (diff) | |
parent | fd2346ccb4e4e447109fc49b16025aa87ae69b86 (diff) | |
download | profani-tty-d7c00360ea4a15233b46ddf59f05434f705eadae.tar.gz |
Merge pull request #874 from spiridoncha/master
Change /clear behaviour. Closes issue #855.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 10 |
1 files changed, 9 insertions, 1 deletions
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); } |