diff --git a/NEWS.md b/NEWS.md index ee9ff20a5..771f6e5af 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ This document attempts to list user-visible changes and any major internal rearrangements of Notcurses. * 2.3.9 (not yet released) + * Fixed two major regressions in 2.3.8: menu highlighting is working once + more, as are pointer inputs (mice). Sorry about that! * `notcurses_detected_terminal()` and `ncdirect_detected_terminal()` now both return a heap-allocated string, which will contain the terminal version if Notcurses was able to detect it. This result ought be free()d. diff --git a/src/lib/internal.h b/src/lib/internal.h index ebc71ed84..7cffe914e 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -1152,14 +1152,14 @@ static inline int mouse_enable(FILE* out){ return term_emit("\x1b[?" SET_BTN_EVENT_MOUSE ";" /*SET_FOCUS_EVENT_MOUSE ";" */SET_SGR_MODE_MOUSE "h", - out, false); + out, true); } static inline int mouse_disable(FILE* out){ return term_emit("\x1b[?" SET_BTN_EVENT_MOUSE ";" /*SET_FOCUS_EVENT_MOUSE ";" */SET_SGR_MODE_MOUSE "l", - out, false); + out, true); } // how many edges need touch a corner for it to be printed? diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index e1c25bc76..d1f7495c9 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -2161,7 +2161,8 @@ ncplane* ncplane_above(ncplane* n){ } int notcurses_mouse_enable(notcurses* n){ - if(n->ttyfd >= 0){ + if(mouse_enable(n->ttyfp)){ + return -1; } return 0; } @@ -2169,7 +2170,8 @@ int notcurses_mouse_enable(notcurses* n){ // this seems to work (note difference in suffix, 'l' vs 'h'), but what about // the sequences 1000 etc? int notcurses_mouse_disable(notcurses* n){ - if(n->ttyfd >= 0){ + if(mouse_disable(n->ttyfp)){ + return -1; } return 0; }