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

Prefer ivy-modified-outside-buffer over ivy-modified-buffer #1745

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/ivy.org
Expand Up @@ -742,6 +742,14 @@ installed.
#+begin_src elisp
(setq ivy-use-virtual-buffers t)
#+end_src

- =ivy-modified-buffer= ::
Highlights modified buffers when switching buffer.
- =ivy-modified-outside-buffer= ::
Highlights buffers modified outside Emacs when switching buffer.

This takes precedence over =ivy-modified-buffer=.

** Defcustoms
:PROPERTIES:
:CUSTOM_ID: defcustoms
Expand Down
4 changes: 2 additions & 2 deletions ivy.el
Expand Up @@ -3811,11 +3811,11 @@ Skip buffers that match `ivy-ignore-buffers'."
(let ((b (get-buffer str)))
(if (and b (buffer-file-name b))
(cond
((buffer-modified-p b)
(ivy-append-face str 'ivy-modified-buffer))
((and (not (file-remote-p (buffer-file-name b)))
(not (verify-visited-file-modtime b)))
(ivy-append-face str 'ivy-modified-outside-buffer))
((buffer-modified-p b)
(ivy-append-face str 'ivy-modified-buffer))
(t str))
str)))

Expand Down