mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
reader: advance/backspace across lines #585
This commit is contained in:
parent
5ba7a4b371
commit
3eb99b2447
@ -61,6 +61,9 @@ bool ncreader_offer_input(ncreader* n, const ncinput* ni){
|
||||
// FIXME breaks for wint_t < 32bits
|
||||
if(snprintf(wbuf, sizeof(wbuf), "%lc", (wint_t)ni->id) < (int)sizeof(wbuf)){
|
||||
ncplane_putegc(n->ncp, wbuf, NULL);
|
||||
if(n->ncp->x == n->ncp->lenx && n->ncp->y < n->ncp->leny - 1){
|
||||
ncplane_cursor_move_yx(n->ncp, n->ncp->y + 1, 0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ auto main() -> int {
|
||||
int dimy, dimx;
|
||||
nc.get_term_dim(&dimy, &dimx);
|
||||
ncreader_options opts{};
|
||||
opts.physrows = dimy / 2;
|
||||
opts.physrows = dimy / 8;
|
||||
opts.physcols = dimx / 2;
|
||||
opts.egc = strdup("░");
|
||||
//ncpp::Reader nr(nc, 0, 0, &opts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user