sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 3eb3533fae6c43907adbd340b24bee79f709504e
parent b2d6839a8c025698cd80118331f21fa4bb459f02
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat,  2 Apr 2022 00:32:28 +0200

sfeed_curses: line editor, temporarily disable the mouse when using the line editor

This allows pasting in the terminal and also doesnt spam mouse events, which
are not useful here.

Diffstat:
Msfeed_curses.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -983,6 +983,8 @@ lineeditor(void) size_t cap = 0, nchars = 0; int ch; + if (usemouse) + mousemode(0); for (;;) { if (nchars + 2 >= cap) { cap = cap ? cap * 2 : 32; @@ -1011,9 +1013,12 @@ lineeditor(void) else /* no signal, time-out or SIGCHLD or SIGWINCH */ continue; /* do not cancel: process signal later */ free(input); - return NULL; /* cancel prompt */ + input = NULL; + break; /* cancel prompt */ } } + if (usemouse) + mousemode(usemouse); return input; }