Compare commits
4 Commits
333049de01
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
61a141203b
|
|||
|
48482ef2e5
|
|||
|
840c69767c
|
|||
|
a14a907b18
|
@@ -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)
|
||||
|
||||
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
||||
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 basic incremental search, normally bound to C-s, in all tabs
|
||||
|
||||
* Fixed jumping to the beginning of the queue after deleting items
|
||||
|
||||
|
||||
1.1.1 (2021-11-04)
|
||||
|
||||
* Terminal focus in/out events no longer ring the terminall bell
|
||||
|
||||
2
liberty
2
liberty
Submodule liberty updated: 782a9a5977...7e8e085c97
15
nncmpp.c
15
nncmpp.c
@@ -2089,6 +2089,8 @@ app_write_mpd_status (struct row_buffer *buf)
|
||||
row_buffer_append (buf, msg, APP_ATTR (HIGHLIGHT));
|
||||
free (msg);
|
||||
}
|
||||
else if (g.poller_curl.registered)
|
||||
row_buffer_append (buf, "Downloading...", APP_ATTR (NORMAL));
|
||||
else if (str_map_find (map, "updating_db"))
|
||||
row_buffer_append (buf, "Updating database...", APP_ATTR (NORMAL));
|
||||
else
|
||||
@@ -2348,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
|
||||
// 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 && i < row->chars_len; i++)
|
||||
if (needle[i] != row->chars[i].c)
|
||||
for (; i < len && start + i < row->chars_len; i++)
|
||||
if (uc_tolower(needle[i]) != uc_tolower(row->chars[start + i].c))
|
||||
break;
|
||||
return i;
|
||||
best = MAX (best, i);
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user