|
@@ -288,12 +288,14 @@ match is equivalent to TAB, and C-j selects the first match.
|
|
|
Since RET in ido already selects the first match, this advice
|
|
|
sets up C-j to be equivalent to TAB in the same situation."
|
|
|
(if (and
|
|
|
- ;; Only if using ico-cr+
|
|
|
+ ;; Only override C-j behavior if...
|
|
|
+ ;; We're using ico-cr+
|
|
|
ido-cr+-enable-this-call
|
|
|
- ;; Only if require-match is non-nil
|
|
|
+ ;; Require-match is non-nil
|
|
|
(with-no-warnings ido-require-match)
|
|
|
- ;; Only if current text is non-empty
|
|
|
- (not (string= ido-text ""))
|
|
|
+ ;; A default was provided, or ido-text is non-empty
|
|
|
+ (or ido-default-item
|
|
|
+ (not (string= ido-text "")))
|
|
|
;; Only if current text is not a complete choice
|
|
|
(not (member ido-text (with-no-warnings ido-cur-list))))
|
|
|
(progn
|