Unset unused markers

In case of overlay leaks.
This commit is contained in:
Henrik Lissner 2020-12-12 15:00:30 -05:00
parent c4a0174fe2
commit 765b6dcfca
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 26 additions and 22 deletions

View file

@ -190,16 +190,17 @@ From https://github.com/emacs-evil/evil/issues/606"
(let* ((count (count-lines beg end))
(count (if (> count 1) (1- count) count))
(fixup-mark (make-marker)))
(dotimes (var count)
(if (and (bolp) (eolp))
(join-line 1)
(let* ((end (line-beginning-position 3))
(fill-column (1+ (- end beg))))
(set-marker fixup-mark (line-end-position))
(fill-region-as-paragraph beg end nil t)
(goto-char fixup-mark)
(fixup-whitespace))))
(set-marker fixup-mark nil)))
(unwind-protect
(dotimes (var count)
(if (and (bolp) (eolp))
(join-line 1)
(let* ((end (line-beginning-position 3))
(fill-column (1+ (- end beg))))
(set-marker fixup-mark (line-end-position))
(fill-region-as-paragraph beg end nil t)
(goto-char fixup-mark)
(fixup-whitespace))))
(set-marker fixup-mark nil))))
;;;###autoload
(defun +evil--fix-dabbrev-in-minibuffer-h ()