notcurses-input: hook up ^L #493

This commit is contained in:
nick black 2020-04-16 06:34:16 -04:00
parent 1a4c8bbf85
commit 4297bbb3dc
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -252,6 +252,14 @@ int main(void){
tid.join();
return EXIT_SUCCESS;
}
if((r == 'L' || r == 'l') && ni.ctrl){
mtx.lock();
if(!nc.refresh(nullptr, nullptr)){
mtx.unlock();
break;
}
mtx.unlock();
}
if(!n->cursor_move(y, 0)){
break;
}
@ -305,11 +313,11 @@ int main(void){
cells.push_front(r);
}
int e = errno;
nc.stop();
if(r == (char32_t)-1 && e){
std::cerr << "Error reading from terminal (" << strerror(e) << "?)\n";
}
done = true;
tid.join();
nc.stop();
return EXIT_FAILURE;
}