Browse Source

Column view: Improve line motion.

Carsten Dominik 16 years ago
parent
commit
558abafab8
2 changed files with 9 additions and 2 deletions
  1. 3 0
      lisp/ChangeLog
  2. 6 2
      lisp/org-colview.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-03-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-colview.el (org-columns-map): Better functions for moving up
+	and down a row, even if `truncate-line' is nil.
+
 	* org.el (org-insert-todo-heading): Make sure the keyword is
 	inserted at the correct position.
 

+ 6 - 2
lisp/org-colview.el

@@ -88,12 +88,16 @@ This is the compiled version of the format.")
 (org-defkey org-columns-map [down]
 	    (lambda () (interactive)
 	      (let ((col (current-column)))
-		(org-no-warnings (next-line))
+		(beginning-of-line 2)
+		(while (and (org-invisible-p2) (not (eobp)))
+		  (beginning-of-line 2))
 		(move-to-column col))))
 (org-defkey org-columns-map [up]
 	    (lambda () (interactive)
 	      (let ((col (current-column)))
-		(org-no-warnings (previous-line))
+		(beginning-of-line 0)
+		(while (and (org-invisible-p2) (not (bobp)))
+		  (beginning-of-line 0))
 		(move-to-column col))))
 (org-defkey org-columns-map [(shift right)] 'org-columns-next-allowed-value)
 (org-defkey org-columns-map "n" 'org-columns-next-allowed-value)