Commit 59173ba0 authored by Jason Blevins's avatar Jason Blevins

Avoid fringe-columns for backwards compatibility

It is not defined in Emacs 24.5. Fixes GH-32.
parent a040f049
......@@ -1155,7 +1155,8 @@ Case is ignored."
If the frame has a fringe, it will absorb the newline.
Otherwise, we reduce the line length by a one-character offset."
(let* ((window (get-buffer-window deft-buffer))
(offset (if (> (fringe-columns 'right) 0) 0 1)))
(fringe-right (ceiling (or (cadr (window-fringes)) 0)))
(offset (if (> fringe-right 0) 0 1)))
(when window
(- (window-text-width window) offset))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment