Skip to content

Commit 1f5f630

Browse files
committed
go-to-dir-add-restarts
Ignore-this: a9fd425c9ab16bd70dc0ccb0ffae2110 (go-up & go-to) darcs-hash:20121223110506-c6c69-f6475852dd5ea1b620d267b1bd92b4e2f4380efa
1 parent 7ae372a commit 1f5f630

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/minifileman.lisp

+8-4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,14 @@
9191
(listbox-get-selection (files-listbox panel))))
9292

9393
(defun go-to-dir (directory panel)
94-
(let ((directory (pretty-directory directory)))
95-
(setf (file-list panel) (minifileman-list-dir directory))
96-
(setf (current-dir panel) directory)
97-
(setf *default-pathname-defaults* directory)))
94+
(restart-case
95+
(let ((directory (pretty-directory directory)))
96+
(setf (file-list panel) (minifileman-list-dir directory))
97+
(setf (current-dir panel) directory)
98+
(setf *default-pathname-defaults* directory))
99+
(go-up () (go-up panel directory))
100+
(go-to (dir) :interactive (lambda () (list (choose-directory :title "Go to directory:")))
101+
(go-to-dir dir panel))))
98102

99103
(defun go-up (panel &optional from-dir)
100104
(go-to-dir (dirname (or from-dir (current-dir panel))) panel))

0 commit comments

Comments
 (0)