reader: advance/backspace across lines #585

pull/592/head
nick black 4 years ago
parent 5ba7a4b371
commit 3eb99b2447
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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…
Cancel
Save