Code

screen_browser: fixed jump to playlist file
authorMax Kellermann <max@duempel.org>
Sun, 17 Jan 2010 16:46:19 +0000 (17:46 +0100)
committerMax Kellermann <max@duempel.org>
Sun, 17 Jan 2010 16:46:19 +0000 (17:46 +0100)
Don't add asterisks around the playlist file name in
browser_lw_callback().  This was useless since we are using the
list_window paint callback, and the formatted playlist name isn't used
anymore for painting.

NEWS
src/screen_browser.c

diff --git a/NEWS b/NEWS
index 31f5e172e862e28ff270761daa6b4d15b0d73c4c..5a99254682a67eb3680340df356a61cb0749045d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 ncmpc 0.17 - not yet released
 * screen_queue: always update the list size
+* screen_browser: fixed jump to playlist file
 
 
 ncmpc 0.16 - (12/25/2009)
index 66727611d0901a41ef0ba71d0b765ab56863ab62..45e11ebcfb4ca679345152cb445822606848c3db 100644 (file)
@@ -45,8 +45,6 @@
 #define HIGHLIGHT  (0x01)
 #endif
 
-static const char playlist_format[] = "*%s*";
-
 #ifndef NCMPC_MINI
 
 /* sync highlight flags with playlist */
@@ -112,7 +110,7 @@ browser_lw_callback(unsigned idx, void *data)
                        mpd_entity_get_playlist(entity);
                char *filename = utf8_to_locale(g_basename(mpd_playlist_get_path(playlist)));
 
-               g_snprintf(buf, BUFSIZE, playlist_format, filename);
+               g_strlcpy(buf, filename, sizeof(buf));
                g_free(filename);
                return buf;
        }