Compare commits
2 Commits
840c69767c
...
61a141203b
Author | SHA1 | Date | |
---|---|---|---|
61a141203b | |||
48482ef2e5 |
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
project (nncmpp VERSION 1.1.1 LANGUAGES C)
|
||||
project (nncmpp VERSION 1.2.0 LANGUAGES C)
|
||||
|
||||
# Moar warnings
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||
|
4
NEWS
4
NEWS
@ -1,10 +1,10 @@
|
||||
x.x.x (xxxx-xx-xx)
|
||||
1.2.0 (2021-12-21)
|
||||
|
||||
* Added ability to control the volume of MPD's current PulseAudio sink
|
||||
|
||||
* Now fetching Internet stream information asynchronously
|
||||
|
||||
* Added rudimentary incremental search, normally bound to C-s, in all tabs
|
||||
* Added basic incremental search, normally bound to C-s, in all tabs
|
||||
|
||||
* Fixed jumping to the beginning of the queue after deleting items
|
||||
|
||||
|
2
liberty
2
liberty
@ -1 +1 @@
|
||||
Subproject commit 782a9a5977bd5f2101e8808b94d659fe52e2490a
|
||||
Subproject commit 7e8e085c97311b52db4d6739b6ef2a1b26a2319f
|
17
nncmpp.c
17
nncmpp.c
@ -2350,12 +2350,17 @@ static size_t
|
||||
incremental_search_match (const ucs4_t *needle, size_t len,
|
||||
const struct row_buffer *row)
|
||||
{
|
||||
// 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;
|
||||
// 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;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user