branch: elpa/dirvish
commit 9f06a1361903921076b415d1b1f6d9fbb4379eff
Author: Alex Lu <hellosimon1...@hotmail.com>
Commit: Alex Lu <hellosimon1...@hotmail.com>

    refactor: enable `font-lock-mode` in file preview
---
 dirvish.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dirvish.el b/dirvish.el
index a2b2d55b13..39cf19048b 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -840,7 +840,7 @@ buffer, it defaults to filename under the cursor when it is 
nil."
       (cond ((ignore-errors (buffer-local-value 'so-long-detected-p buf))
              (kill-buffer buf)
              `(info . ,(format "File [ %s ] contains very long lines" name)))
-            (t `(buffer . ,buf))))))
+            (t (with-current-buffer buf (font-lock-mode 1) `(buffer . 
,buf)))))))
 
 (dirvish-define-preview disable (file ext)
   "Disable preview in some cases."

Reply via email to