Cursor in Dired buffer sometimes go to a line which is not an item line. For example, the 1st line and the last line: > d:/Desktop/.emacs.d/site-lisp: drwxrwxrwx shynur 4096 08/30 18:15 . drwxrwxrwx shynur 4096 08/30 18:07 .. -rw-rw-rw- shynur 304 08/09 3:01 subdirs.el > \Newline here. Avoiding these lines may improve the experience when moving cursor. The attaching patch implements this. If there is no visible item line, move the cursor as Dired used to do.