[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42862: 28.0.50; {previous,next}-line-or-history-element ignores line
From: |
Michael Welsh Duggan |
Subject: |
bug#42862: 28.0.50; {previous,next}-line-or-history-element ignores line-move-visual |
Date: |
Wed, 19 Aug 2020 10:43:50 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
>>> Are you sure that `next-line-or-history-element' needs the same fix?
>>
>> It does not. I had assumed it would, but experimentation seems to show
>> that it does not have the same problem.
>
> Ah, I see now that you already addressed this point in your later
> message, sorry.
>
> I see that you use `visual-line-mode' in your patch. It's still confusing to
> me
> the difference between `visual-line-mode' and `line-move-visual', and which
> one
> should be checked in `previous-line-or-history-element'. As I understand,
> `line-move-visual' is more low-level, right? Then it could cover more cases.
I agree. Using `line-move-visual' is more correct.
>>> + (if (not line-move-visual) ; (bug#42862)
>>> + (goto-char (point-max))
>>
>> I would recommend (end-of-line) instead, for when the prompt (in
>> history) is actually a multi-line prompt, otherwise it will fall prey to
>> the same problem that `end-of-visual-line' is attempting to solve here.
>
> Right, let's use `end-of-line' to move to the end of the first logical line.
> Thanks for your help.
No problem.
--
Michael Welsh Duggan
(md5i@md5i.com)