Skip to content

Commit

Permalink
Merge pull request #213 from duianto/next-prev-line-optional-count-arg
Browse files Browse the repository at this point in the history
update next/prev line, optional count argument
  • Loading branch information
aborn authored Dec 29, 2016
2 parents 79151f7 + 2940296 commit 0fb23de
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions neotree.el
Original file line number Diff line number Diff line change
Expand Up @@ -1657,15 +1657,17 @@ NeoTree buffer is BUFFER."
;; Interactive functions
;;

(defun neotree-next-line ()
"Move next line in NeoTree buffer."
(interactive)
(neo-buffer--forward-line 1))

(defun neotree-previous-line ()
"Move previous line in NeoTree buffer."
(interactive)
(neo-buffer--forward-line -1))
(defun neotree-next-line (&optional count)
"Move next line in NeoTree buffer.
Optional COUNT argument, moves COUNT lines down."
(interactive "p")
(neo-buffer--forward-line (or count 1)))

(defun neotree-previous-line (&optional count)
"Move previous line in NeoTree buffer.
Optional COUNT argument, moves COUNT lines up."
(interactive "p")
(neo-buffer--forward-line (- (or count 1))))

;;;###autoload
(defun neotree-find (&optional path default-path)
Expand Down

0 comments on commit 0fb23de

Please sign in to comment.