File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,13 +132,15 @@ You probably shouldn't use this function directly."
132132 #'diff-hl-highlight-on-margin )
133133 (setq-local diff-hl-highlight-reference-function
134134 #'diff-hl-highlight-on-margin-flat )
135- (setq-local diff-hl-margin-old-width (symbol-value width-var))
136- (set width-var 1 ))
135+ (when (zerop (symbol-value width-var))
136+ (setq-local diff-hl-margin-old-width (symbol-value width-var))
137+ (set width-var 1 )))
137138 (when diff-hl-margin-old-highlight-function
138139 (setq diff-hl-highlight-function diff-hl-margin-old-highlight-function
139140 diff-hl-highlight-reference-function diff-hl-margin-old-highlight-ref-function
140141 diff-hl-margin-old-highlight-function nil ))
141- (set width-var diff-hl-margin-old-width)
142+ (when diff-hl-margin-old-width
143+ (set width-var diff-hl-margin-old-width))
142144 (kill-local-variable 'diff-hl-margin-old-width )))
143145 (dolist (win (get-buffer-window-list ))
144146 (set-window-buffer win (current-buffer ))))
You can’t perform that action at this time.
0 commit comments