branch: scratch/add-vdiff
commit 74feddfc71bcc43b5f2718112fdd2455aa679080
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>
Adjust width of subtraction string
Under emacs -nw the width calculation is not right for some reason.
---
vdiff.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vdiff.el b/vdiff.el
index d971a27..2d29cdf 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -833,7 +833,7 @@ of a \"word\"."
(defun vdiff--make-subtraction-string (n-lines)
"Make string to fill in space for lines missing in a buffer."
- (let* ((width (1- (window-text-width (get-buffer-window (current-buffer)))))
+ (let* ((width (- (window-text-width (get-buffer-window (current-buffer))) 2))
(win-height (window-height (get-buffer-window (current-buffer))))
(max-lines (floor (* 0.7 win-height)))
(truncate (> n-lines max-lines))