Code

Fixed bug 0000212
authorKalle Wallin <kaw@linux.se>
Fri, 26 Mar 2004 23:16:49 +0000 (23:16 +0000)
committerKalle Wallin <kaw@linux.se>
Fri, 26 Mar 2004 23:16:49 +0000 (23:16 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@505 09075e82-0dd4-0310-85a5-a0d7c8717e4f

list_window.c

index ee08a8b8134d2582a840594905511d7955669065..ab6c7d43b0cd9b44f02e4157057a1364c30573f2 100644 (file)
@@ -166,11 +166,15 @@ list_window_find(list_window_t *lw,
              lw->selected = i;
              return 0;
            }
-         i++;
          if( wrap && i==lw->selected )
            return 1;
+         i++;
+       }
+      if( wrap )
+       {
+         i=0; /* first item */
+         beep(); 
        }
-      i=0; /* first item */
     }
   return 1;
 }
@@ -197,11 +201,15 @@ list_window_rfind(list_window_t *lw,
              lw->selected = i;
              return 0;
            }
-         i--;
          if( wrap && i==lw->selected )
            return 1;
+         i--;
+       }
+      if( wrap )
+       {
+         i=rows-1; /* last item */
+         beep();
        }
-      i=rows-1; /* last item */
     }
   return 1;
 }