aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <[email protected]>2002-06-15 18:59:03 +0000
committerColin Walters <[email protected]>2002-06-15 18:59:03 +0000
commit0ce780e196717a01b9eb1324d176e00e5cb2c38e (patch)
tree36de0563dd94ac4544c3c98ad1ca1e4891482389
parent751830932dfacaba553835221679a72fe2ac9ce8 (diff)
(ibuffer-movement-cycle): New variable.
(ibuffer-backward-line, ibuffer-forward-line): Use it.
-rw-r--r--lisp/ibuffer.el22
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 9195b3a746..c622606f31 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -221,6 +221,11 @@ specialized filtering occurs before real filtering."
(defvar ibuffer-current-format nil)
+(defcustom ibuffer-movement-cycle t
+ "If non-nil, then forward and backwards movement commands cycle."
+ :type 'boolean
+ :group 'ibuffer)
+
(defcustom ibuffer-modified-char ?*
"The character to display for modified buffers."
:type 'character
@@ -893,9 +898,10 @@ width and the longest string in LIST."
(beginning-of-line)
(while (> arg 0)
(forward-line -1)
- (when (or (get-text-property (point) 'ibuffer-title)
- (and skip-group-names
- (get-text-property (point) 'ibuffer-filter-group-name)))
+ (when (and ibuffer-movement-cycle
+ (or (get-text-property (point) 'ibuffer-title)
+ (and skip-group-names
+ (get-text-property (point) 'ibuffer-filter-group-name))))
(goto-char (point-max))
(beginning-of-line))
(ibuffer-skip-properties (append '(ibuffer-summary)
@@ -914,8 +920,9 @@ width and the longest string in LIST."
(unless arg
(setq arg 1))
(beginning-of-line)
- (when (or (eobp)
- (get-text-property (point) 'ibuffer-summary))
+ (when (and ibuffer-movement-cycle
+ (or (eobp)
+ (get-text-property (point) 'ibuffer-summary)))
(goto-char (point-min)))
(when (or (get-text-property (point) 'ibuffer-title)
(and skip-group-names
@@ -930,8 +937,9 @@ width and the longest string in LIST."
(ibuffer-backward-line (- arg))
(while (> arg 0)
(forward-line 1)
- (when (or (eobp)
- (get-text-property (point) 'ibuffer-summary))
+ (when (and ibuffer-movement-cycle
+ (or (eobp)
+ (get-text-property (point) 'ibuffer-summary)))
(goto-char (point-min)))
(decf arg)
(ibuffer-skip-properties (append '(ibuffer-title)