From 62a3e3699c90b6edc7eb24e1db1773ac8febb546 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 6 Apr 2020 13:46:35 -0400 Subject: Implement split scrolling --- ui.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ui.c b/ui.c index 2a26ac3..c736246 100644 --- a/ui.c +++ b/ui.c @@ -258,6 +258,8 @@ static void errExit(void) { reset_shell_mode(); } +enum { SplitLines = 5 }; + void uiInit(void) { initscr(); cbreak(); @@ -279,9 +281,8 @@ void uiInit(void) { status = newwin(1, COLS, 0, 0); if (!status) err(EX_OSERR, "newwin"); - marker = newwin(1, COLS, LINES - 2, 0); - short fg = 8 + COLOR_BLACK; - wbkgd(marker, '~' | colorAttr(fg) | COLOR_PAIR(colorPair(fg, -1))); + marker = newwin(1, COLS, BOTTOM - SplitLines - 1, 0); + wbkgd(marker, ACS_BULLET); input = newpad(1, 1024); if (!input) err(EX_OSERR, "newpad"); @@ -311,6 +312,12 @@ void uiDraw(void) { if (window->scroll) { touchwin(marker); wnoutrefresh(marker); + pnoutrefresh( + window->pad, + WindowLines - SplitLines, 0, + BOTTOM - SplitLines, 0, + BOTTOM - 1, RIGHT + ); } int y, x; getyx(input, y, x); @@ -655,7 +662,7 @@ static void reflow(struct Window *window) { } static void resize(void) { - mvwin(marker, LINES - 2, 0); + mvwin(marker, BOTTOM - SplitLines - 1, 0); int height, width; getmaxyx(windows.ptrs[0]->pad, height, width); if (width == COLS) return; -- cgit 1.4.1 1ad2fe435f148&follow=1'>diff
path: root/src/arith_yacc.c (unfollow)
Commit message (Expand)Author
2018-04-19eval: Reap zombies after built-in commands and functionsHerbert Xu
2018-04-19redir: Fix typo in noclobber codeHerbert Xu
2018-04-19expand: Fix glibc glob(3) supportHerbert Xu
2018-04-02expand: Fix buffer overflow in expandmetaHerbert Xu
2018-04-02builtin: Move echo space/nl handling into print_escape_strHerbert Xu
2018-04-02builtin: Fix echo performance regressionHerbert Xu
2018-04-02expand: Fix ghost fields with unquoted $@/$*Herbert Xu
2018-04-02parser: Allow newlines within parameter substitutionHerbert Xu
2018-04-02expand: Fix bugs with words connected to the right of $@Herbert Xu
2018-03-25Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"Herbert Xu
2018-03-22parser: Fix backquote support in here-document EOF markHerbert Xu