Skip to content

Commit 5fe0c50

Browse files
committed
Use set window point instead.
1 parent cff70f0 commit 5fe0c50

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ivy-file-preview.el

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,13 @@ POS can either be an integer or cons cell represent line number and columns."
114114
"Revert frame status if user cancel the commands."
115115
(unless ivy-exit
116116
(switch-to-buffer (pop ivy-file-preview--window-status))
117-
(ivy-file-preview--goto-line (pop ivy-file-preview--window-status))
118-
(move-to-column (pop ivy-file-preview--window-status))))
117+
(set-window-point minibuffer-scroll-window (pop ivy-file-preview--window-status))))
119118

120119
(defun ivy-file-preview--enter ()
121120
"Execution after minibuffer setup."
122121
(setq ivy-file-preview--window-status '())
123122
(with-selected-window minibuffer-scroll-window
124-
(push (current-column) ivy-file-preview--window-status)
125-
(push (line-number-at-pos) ivy-file-preview--window-status)
123+
(push (window-point) ivy-file-preview--window-status)
126124
(push (buffer-name) ivy-file-preview--window-status)))
127125

128126
(defun ivy-file-preview--exit ()

0 commit comments

Comments
 (0)