branch: externals/dired-preview commit 534922c437d56038c7bbf29b1d1dc5b755175cdd Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Use >= instead of > when killing buffers This is to make sure that we do not stay above the limit. Thanks to artelse for reporting this as part of the discussion in issue 20: <https://github.com/protesilaos/dired-preview/issues/20>. --- dired-preview.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dired-preview.el b/dired-preview.el index c5fb9e270d..1629b96ddd 100644 --- a/dired-preview.el +++ b/dired-preview.el @@ -209,7 +209,7 @@ implementation details." (let ((length (length buffers))) (catch 'enough (dolist (buffer buffers) - (if (> length max-length) + (if (>= length max-length) (when (not (eq buffer (current-buffer))) (ignore-errors (kill-buffer-if-not-modified buffer)) (setq length (1- length))