Fix cursor position after changing bullet types

This commit is contained in:
Carsten Dominik 2010-03-17 16:11:13 +01:00
parent 32c2231e96
commit b2343cef32
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2010-03-17 Carsten Dominik <carsten.dominik@gmail.com>
* org-list.el (org-fix-bullet-type): Improve cursor positioning.
2010-03-15 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-adaptive-fill-regexp-backup): New variable.

View File

@ -852,7 +852,7 @@ Also, fix the indentation."
(interactive)
(unless (org-at-item-p) (error "This is not a list"))
(let ((line (org-current-line))
(col (current-column))
(chars-from-eol (- (point-at-eol) (point)))
(ind (current-indentation))
ind1 bullet oldbullet)
;; find where this list begins
@ -883,7 +883,7 @@ Also, fix the indentation."
(org-shift-item-indentation (- (length bullet)
(length oldbullet))))))
(org-goto-line line)
(org-move-to-column col)
(goto-char (max (point-at-bol) (- (point-at-eol) chars-from-eol)))
(if (string-match "[0-9]" bullet)
(org-renumber-ordered-list 1))))