poc multiselect/selector: allow mouse_enable failure

This commit is contained in:
nick black 2021-08-24 01:44:34 -04:00 committed by nick black
parent fe83d258d6
commit 6ee6a68754
3 changed files with 2 additions and 21 deletions

View File

@ -69,10 +69,7 @@ int main(void){
if(nc == NULL){
return EXIT_FAILURE;
}
if(notcurses_mouse_enable(nc)){
notcurses_stop(nc);
return EXIT_FAILURE;
}
notcurses_mouse_enable(nc);
ncmultiselector_options sopts;
memset(&sopts, 0, sizeof(sopts));
sopts.maxdisplay = 10;

View File

@ -59,10 +59,7 @@ int main(void){
if(nc == NULL){
return EXIT_FAILURE;
}
if(notcurses_mouse_enable(nc)){
notcurses_stop(nc);
return EXIT_FAILURE;
}
notcurses_mouse_enable(nc);
ncselector_options sopts;
memset(&sopts, 0, sizeof(sopts));
sopts.maxdisplay = 4;

View File

@ -1,13 +0,0 @@
#include "main.h"
TEST_CASE("Input") {
auto nc_ = testing_notcurses();
if(!nc_){
return;
}
REQUIRE(0 == notcurses_mouse_enable(nc_));
CHECK(0 == notcurses_mouse_disable(nc_));
CHECK(0 == notcurses_stop(nc_));
}