From 6f803ca2a5a5a8c6e223e06d314f5b9bf456916b Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 14 Dec 2021 16:54:03 -0600 Subject: [PATCH] [pocpp] add NCOPTION_DRAIN_INPUT where appropriate --- src/pocpp/resize.cpp | 4 +++- src/pocpp/rgbbg.cpp | 4 +++- src/pocpp/widestomp.cpp | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pocpp/resize.cpp b/src/pocpp/resize.cpp index 40480f062..3a8dd6c8a 100644 --- a/src/pocpp/resize.cpp +++ b/src/pocpp/resize.cpp @@ -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; diff --git a/src/pocpp/rgbbg.cpp b/src/pocpp/rgbbg.cpp index c74b2d109..c62a88eea 100644 --- a/src/pocpp/rgbbg.cpp +++ b/src/pocpp/rgbbg.cpp @@ -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; diff --git a/src/pocpp/widestomp.cpp b/src/pocpp/widestomp.cpp index 09f211098..5efcf46e8 100644 --- a/src/pocpp/widestomp.cpp +++ b/src/pocpp/widestomp.cpp @@ -45,7 +45,8 @@ auto stomper(NotCurses& nc, std::shared_ptr& 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 n(nc.get_stdplane());