We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 291c996 commit f346a51Copy full SHA for f346a51
compact-blame.el
@@ -528,6 +528,12 @@ to variables as a single unit"
528
(message "Buffer %s is modified! Turning off compact-blame-mode"
529
(current-buffer))
530
(setq compact-blame-mode nil))
531
+ ;; 'git blame' won't show anything for empty file
532
+ (message "min=%s max=%s" (point-min) (point-max))
533
+ (when (and compact-blame-mode (= (point-min) (point-max)))
534
+ (message "Empty file %s. Turning off compact-blame-mode"
535
+ (current-buffer))
536
+ (setq compact-blame-mode nil))
537
(if compact-blame-mode
538
(progn
539
(set (make-local-variable 'compact-blame-saved-readonly)
0 commit comments