浏览代码

Fix cursor movement to a specific column

* lisp/org-compat.el (org-move-to-column): Turn off invisibility stuff
for moving the cursor to a column.

Pathc by Nick Dokos
Carsten Dominik 11 年之前
父节点
当前提交
7f9d0688d4
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      lisp/org-compat.el

+ 6 - 3
lisp/org-compat.el

@@ -336,9 +336,12 @@ Works on both Emacs and XEmacs."
     (indent-line-to column)))
 
 (defun org-move-to-column (column &optional force buffer)
-  (if (featurep 'xemacs)
-      (org-xemacs-without-invisibility (move-to-column column force buffer))
-    (move-to-column column force)))
+  ;; set buffer-invisibility-spec to nil so that move-to-column
+  ;; does the right thing despite the presence of invisible text.
+  (let ((buffer-invisibility-spec nil))
+    (if (featurep 'xemacs)
+	(org-xemacs-without-invisibility (move-to-column column force buffer))
+      (move-to-column column force))))
 
 (defun org-get-x-clipboard-compat (value)
   "Get the clipboard value on XEmacs or Emacs 21."