Compare commits

..

No commits in common. "61a141203bf8d5a4589cdb7108ff8469564251d9" and "840c69767c6eea61e69343546ecdadae70b9afad" have entirely different histories.

4 changed files with 10 additions and 15 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.0)
project (nncmpp VERSION 1.2.0 LANGUAGES C)
project (nncmpp VERSION 1.1.1 LANGUAGES C)
# Moar warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)

4
NEWS
View File

@ -1,10 +1,10 @@
1.2.0 (2021-12-21)
x.x.x (xxxx-xx-xx)
* Added ability to control the volume of MPD's current PulseAudio sink
* Now fetching Internet stream information asynchronously
* Added basic incremental search, normally bound to C-s, in all tabs
* Added rudimentary incremental search, normally bound to C-s, in all tabs
* Fixed jumping to the beginning of the queue after deleting items

@ -1 +1 @@
Subproject commit 7e8e085c97311b52db4d6739b6ef2a1b26a2319f
Subproject commit 782a9a5977bd5f2101e8808b94d659fe52e2490a

View File

@ -2350,17 +2350,12 @@ static size_t
incremental_search_match (const ucs4_t *needle, size_t len,
const struct row_buffer *row)
{
// XXX: this is slow and simplistic, but unistring is awkward to use
size_t best = 0;
for (size_t start = 0; start < row->chars_len; start++)
{
size_t i = 0;
for (; i < len && start + i < row->chars_len; i++)
if (uc_tolower(needle[i]) != uc_tolower(row->chars[start + i].c))
break;
best = MAX (best, i);
}
return best;
// TODO: case-insensitive search, wilcards, regexps, something easy to use
size_t i = 0;
for (; i < len && i < row->chars_len; i++)
if (needle[i] != row->chars[i].c)
break;
return i;
}
static void