File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,10 @@ An optional argument INDEX is use to find current ivy candidate."
108108 (unless index (setq index ivy--index))
109109 (cond ((memq ivy-file-preview--this-command '(ivy-searcher-search-file
110110 ivy-searcher-search-project))
111- (or (plist-get (nth index ivy-searcher--candidates) :end )
112- (+ pos (length ivy-text))))
111+ (let* ((cand (nth index ivy-searcher--candidates))
112+ (plist-data (cdr cand))
113+ (end-pt (plist-get plist-data :end )))
114+ (or end-pt (+ pos (length ivy-text)))))
113115 (t (+ pos (length ivy-text)))))
114116
115117(defun ivy-file-preview--project-path ()
@@ -197,7 +199,7 @@ If CURRENT-OV is non-nil it create overlay that are currently selected."
197199 (setq entered t ))
198200 (when entered (setq break t )))
199201 (setq index (1+ index)))
200- results))
202+ ( reverse results) ))
201203
202204(defun ivy-file-preview--swap-current-overlay ()
203205 " Delete the previous selected overlay and swap with current selected overlay."
You can’t perform that action at this time.
0 commit comments