[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19824: 25.0.50; Support goal column in multi-line minibuffer
From: |
Eli Zaretskii |
Subject: |
bug#19824: 25.0.50; Support goal column in multi-line minibuffer |
Date: |
Tue, 10 Feb 2015 17:57:02 +0200 |
> From: Juri Linkov <juri@linkov.net>
> Date: Tue, 10 Feb 2015 02:45:33 +0200
>
> In the single-line minibuffer the goal column was handled by using the point's
> absolute position that is the same as the column on the single line.
> However, this doesn't work on the multi-line minibuffer. This patch adds
> support for the goal column on multi-line input in the minibuffer:
Thanks.
> - (let ((old-point (point)))
> + (let* ((old-point (point))
> + ;; Remember the original goal column of possibly multi-line input
> + ;; excluding the length of the prompt on the first line.
> + (prompt-end (minibuffer-prompt-end))
> + (old-column (unless (and (eolp) (> (point) prompt-end))
> + (if (= (line-number-at-pos) 1)
> + (max (- (current-column) (1- prompt-end)) 0)
> + (current-column)))))
Why do you use current-column and move-to-column here, instead of
using the line-move-visual methods we use by default in any other
buffer? Is there some technical problem to use visual-line movement
in the minibuffer? If not, I think we should do that for consistency
of the user experience.