Skip to content

Commit

Permalink
Merge pull request #877 from vindarel/main
Browse files Browse the repository at this point in the history
directory-mode: sort and follow file name (fixes)
  • Loading branch information
cxxxr authored Jul 24, 2023
2 parents 183936d + bcfb183 commit 2dfb4f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Other Lem features include:

# Download

**Lem 2.0 was released!**
**Lem 2.1 was released!**

See our [Lem 2.0 realease](https://github.com/lem-project/lem/releases/tag/v2.0.0) to
See our [Lem 2.1 realease](https://github.com/lem-project/lem/releases/tag/v2.1.0) to
download binaries for Windows, MacOS and Linux.

On mac, you need to run `xattr -d com.apple.quarantine /Applications/lem.app`.
Expand Down
5 changes: 3 additions & 2 deletions src/ext/directory-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
"Sort files: by name, by last modification time, then by size.
Each new directory buffer first uses the default sort method (`lem/directory-mode:*default-sort-method*')"
(let ((filename (file-namestring (get-pathname (current-point)))))
(let ((path (get-pathname (current-point))))
(cond
;; mtime -> size
((eql (buffer-value (current-buffer) :sort-method) :mtime)
Expand All @@ -477,7 +477,8 @@
(update (current-buffer) :sort-method :mtime)))

;; Follow file name.
(search-filename-and-recenter filename)))
(when (and path (str:non-blank-string-p (file-namestring path)))
(search-filename-and-recenter (file-namestring path)))))

(define-command make-directory (filename) ("FMake directory: ")
(setf filename (uiop:ensure-directory-pathname filename))
Expand Down

0 comments on commit 2dfb4f1

Please sign in to comment.