소스 검색

org.el (org-cycle-internal-local): Fix trailing character bug

* org.el (org-cycle-internal-local): Don't show a trailing
character when cycling a subtree that ends with a non-newline
character at the end of the buffer or the narrowed region.
Nicolas Richard 11 년 전
부모
커밋
54f4d2f4a4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -6729,7 +6729,8 @@ in special contexts.
 	    (setq has-children (org-list-has-child-p (point) struct)))
 	(org-back-to-heading)
 	(setq eoh (save-excursion (outline-end-of-heading) (point)))
-	(setq eos (save-excursion (1- (org-end-of-subtree t t))))
+	(setq eos (save-excursion (org-end-of-subtree t t)
+				  (when (bolp) (backward-char)) (point)))
 	(setq has-children
 	      (or (save-excursion
 		    (let ((level (funcall outline-level)))