Fix jumpy cursor in org tables when using evil-replace

This commit is contained in:
Henrik Lissner 2018-05-30 18:15:30 +02:00
parent ff3f18ccaf
commit 5948a52a38
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -307,10 +307,11 @@ wrong places)."
(defun +org|realign-table-maybe () (defun +org|realign-table-maybe ()
"Auto-align table under cursor and re-calculate formulas." "Auto-align table under cursor and re-calculate formulas."
(when (and (org-at-table-p) org-table-may-need-update) (when (and (org-at-table-p) org-table-may-need-update)
(save-excursion (let ((pt (point)))
(quiet! (quiet!
(org-table-recalculate) (org-table-recalculate)
(if org-table-may-need-update (org-table-align)))))) (if org-table-may-need-update (org-table-align)))
(goto-char pt))))
;;;###autoload ;;;###autoload
(defun +org*realign-table-maybe (&rest _) (defun +org*realign-table-maybe (&rest _)