From: Benno Schulenberg Date: Wed, 23 Mar 2016 10:27:54 +0000 (+0000) Subject: Polling the keyboard once per second instead of once per two seconds. X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3660c62bc0dbb415f9a8b9fef5183cb9d42e25b2;p=nano.git Polling the keyboard once per second instead of once per two seconds. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index e87b2851..231cbe4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ finding the first occurrence twice. And delete the piece of dead code that was meant to do this. This fixes Savannah bug #47188. * src/search.c (findnextstr): Clean up and rename a variable. + * src/search.c (findnextstr): Poll the keyboard once per second. 2016-03-22 Thomas Rosenau * configure.ac, src/*.c: Check for the existence of the REG_ENHANCED diff --git a/src/search.c b/src/search.c index af03f2ba..6a43f046 100644 --- a/src/search.c +++ b/src/search.c @@ -281,7 +281,8 @@ bool findnextstr( /* Start searching through the lines, looking for the needle. */ while (TRUE) { - if (time(NULL) - lastkbcheck > 1) { + /* Glance at the keyboard once every second. */ + if (time(NULL) - lastkbcheck > 0) { int input = parse_kbinput(edit); lastkbcheck = time(NULL);