[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: |
Juri Linkov |
Subject: |
bug#42862: 28.0.50; {previous,next}-line-or-history-element ignores line-move-visual |
Date: |
Mon, 17 Aug 2020 03:47:27 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> 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.
>> + (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.