[pocpp] add NCOPTION_DRAIN_INPUT where appropriate

pull/2478/head
nick black 2 years ago
parent 2d098e6ede
commit 6f803ca2a5

@ -16,7 +16,9 @@ int main(int argc, char** argv){
file = argv[1];
}
notcurses_options opts{};
opts.flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN;
opts.flags = NCOPTION_INHIBIT_SETLOCALE
| NCOPTION_NO_ALTERNATE_SCREEN
| NCOPTION_DRAIN_INPUT;
struct notcurses* nc;
if((nc = notcurses_init(&opts, nullptr)) == nullptr){
return EXIT_FAILURE;

@ -9,7 +9,9 @@ auto main() -> int {
return EXIT_FAILURE;
}
notcurses_options opts{};
opts.flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN;
opts.flags = NCOPTION_INHIBIT_SETLOCALE
| NCOPTION_NO_ALTERNATE_SCREEN
| NCOPTION_DRAIN_INPUT;
struct notcurses* nc = notcurses_init(&opts, nullptr);
if(nc == nullptr){
return EXIT_FAILURE;

@ -45,7 +45,8 @@ auto stomper(NotCurses& nc, std::shared_ptr<Plane>& nn) -> int {
auto main() -> int {
setlocale(LC_ALL, "");
notcurses_options nopts{};
nopts.flags = NCOPTION_INHIBIT_SETLOCALE;
nopts.flags = NCOPTION_INHIBIT_SETLOCALE
| NCOPTION_DRAIN_INPUT;
NotCurses nc(nopts);
std::shared_ptr<Plane> n(nc.get_stdplane());

Loading…
Cancel
Save