From 014385a9f689bfdb7aebcacf6635b1af2200d6db Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 7 Feb 2020 04:23:07 -0500 Subject: [PATCH] Prevent numerical type errors on after-find-file In some edge cases. --- core/core-editor.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 81cc7ae10..570a43fc4 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -43,10 +43,11 @@ possible." (and buffer-file-name (not doom-large-file-p) (file-exists-p buffer-file-name) - (> (nth 7 (file-attributes buffer-file-name)) - (* 1024 1024 - (assoc-default buffer-file-name doom-large-file-size-alist - #'string-match-p))))) + (ignore-errors + (> (nth 7 (file-attributes buffer-file-name)) + (* 1024 1024 + (assoc-default buffer-file-name doom-large-file-size-alist + #'string-match-p)))))) (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil)