diff options
author | Kalle Wallin <kaw@linux.se> | 2004-04-23 17:04:22 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-04-23 17:04:22 +0000 |
commit | 3bfb4ca31c50e4351adac5da7afe31771cbb0734 (patch) | |
tree | 0c354a98ccf2b989eda4d55f5361f663cd06647e | |
parent | 25e197ccf7682ae2c124a4c848513c33f81fd689 (diff) | |
download | mpd-3bfb4ca31c50e4351adac5da7afe31771cbb0734.tar.gz mpd-3bfb4ca31c50e4351adac5da7afe31771cbb0734.tar.xz mpd-3bfb4ca31c50e4351adac5da7afe31771cbb0734.zip |
Make shure the cursor stays on the same row when deleting.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@879 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | screen_play.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/screen_play.c b/screen_play.c index cfdfa410a..66073d2b6 100644 --- a/screen_play.c +++ b/screen_play.c @@ -34,8 +34,6 @@ #define BUFSIZE 256 -#define ENABLE_FANCY_PLAYLIST_MANAGMENT - static list_window_t *lw = NULL; static char * @@ -248,7 +246,7 @@ playlist_add_song(mpd_client_t *c, mpd_Song *song) if( mpc_error(c) ) return -1; -#ifdef ENABLE_FANCY_PLAYLIST_MANAGMENT +#ifndef DISABLE_FANCY_PLAYLIST_MANAGMENT /* add the song to playlist */ c->playlist = g_list_append(c->playlist, (gpointer) mpd_songDup(song)); c->playlist_length++; @@ -287,7 +285,7 @@ playlist_delete_song(mpd_client_t *c, int index) /* clear selected highlight in the browse screen */ file_set_highlight(c, song, 0); -#ifdef ENABLE_FANCY_PLAYLIST_MANAGMENT +#ifndef DISABLE_FANCY_PLAYLIST_MANAGMENT /* increment the playlist id, so we dont retrives a new playlist */ c->playlist_id++; @@ -306,6 +304,8 @@ playlist_delete_song(mpd_client_t *c, int index) /* make shure the playlist is repainted */ lw->clear = 1; lw->repaint = 1; + if( lw->start>0 ) + lw->start--; /* make shure we stay on the same row */ list_window_check_selected(lw, c->playlist_length); #endif |