diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index f43c2c0e0..9ed9b77e0 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -50,12 +50,12 @@ struct ncfadectx; // context for a palette fade operation typedef enum { NCBLIT_DEFAULT, // let the ncvisual pick NCBLIT_1x1, // full block █ - NCBLIT_2x1, // full/(upper|left) blocks ▄█ + NCBLIT_2x1, // upper half + 1x1 ▀█ NCBLIT_1x1x4, // shaded full blocks ▓▒░█ - NCBLIT_2x2, // quadrants ▗▐ ▖▄▟▌▙█ - NCBLIT_4x1, // four vert/horz levels █▆▄▂ / ▎▌▊█ + NCBLIT_2x2, // quadrants + 2x1 ▗▐ ▖▀▟▌▙█ + NCBLIT_4x1, // four vertical levels █▆▄▂ NCBLIT_BRAILLE, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿ - NCBLIT_8x1, // eight vert/horz levels █▇▆▅▄▃▂▁ / ▏▎▍▌▋▊▉█ + NCBLIT_8x1, // eight vertical levels █▇▆▅▄▃▂▁ NCBLIT_SIXEL, // 6 rows, 1 col (RGB), spotty support among terminals } ncblitter_e; diff --git a/src/lib/reel.c b/src/lib/reel.c index 46d54e5ec..da3bdd2ba 100644 --- a/src/lib/reel.c +++ b/src/lib/reel.c @@ -832,6 +832,8 @@ bool ncreel_offer_input(ncreel* n, const ncinput* nc){ ncreel_next(n); return true; } - // FIXME there are a few more + // FIXME there are a few more: + // page up/page down + // end/home (when not using infinite scrolling) return false; } diff --git a/src/ncreel/main.cpp b/src/ncreel/main.cpp index d80e22fde..842c260e9 100644 --- a/src/ncreel/main.cpp +++ b/src/ncreel/main.cpp @@ -19,6 +19,14 @@ class TabletCtx { int getLines() const { return lines; } + void addLine() { + ++lines; + } + void subLine() { + if(lines){ + --lines; + } + } int getIdx() const { return idx; } @@ -122,7 +130,21 @@ int runreels(struct notcurses* nc, struct ncplane* n, ncreel_options* nopts){ case 'd': ncreel_del(nr, ncreel_focused(nr)); break; - case '*': + case '+':{ + auto t = ncreel_focused(nr); + if(t){ + auto tctx = static_cast(nctablet_userptr(t)); + tctx->addLine(); + } + break; + }case '-':{ + auto t = ncreel_focused(nr); + if(t){ + auto tctx = static_cast(nctablet_userptr(t)); + tctx->subLine(); + } + break; + }case '*': notcurses_debug(nc, stderr); break; case NCKEY_LEFT: @@ -170,7 +192,7 @@ int main(int argc, char** argv){ } int dimy, dimx; auto nstd = notcurses_stddim_yx(nc, &dimy, &dimx); - if(ncplane_putstr_aligned(nstd, 0, NCALIGN_CENTER, "(a)dd (d)el (q)uit") <= 0){ + if(ncplane_putstr_aligned(nstd, 0, NCALIGN_CENTER, "(a)dd (d)el (+/-) change lines (q)uit") <= 0){ return -1; } auto n = ncplane_new(nc, dimy - 1 - (margin_t + margin_b),