Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directory-mode: sort and follow file name (fixes) #877

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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