[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46814: 26.3; Visual-line-mode produces fake newline if line begins w
From: |
Kévin Le Gouguec |
Subject: |
bug#46814: 26.3; Visual-line-mode produces fake newline if line begins with space |
Date: |
Sat, 27 Feb 2021 23:14:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Miguel V. S. Frasson" <mvsfrasson@gmail.com>
>> Date: Sat, 27 Feb 2021 13:30:23 -0300
>>
>> In visual-line-mode, if after leading whitespace it follows very long
>> text without spaces, it occurs a visual line break after the leading
>> whitespace, creating an false blank line, annoying users because extra
>> blank lines may change the meaning of text.
>>
>> It would be more sensible in visual-line-mode forbids visual line breaks
>> after leading whitespace, because they always create blank lines.
>
> Patches are welcome to implement this. Word of warning: the current
> implementation of this is in C, as part of the display engine, and
> it's very complex.
Should this be merged with bug#11759 and bug#31666? Skimming [1], I get
the impression that this new report describes a similar problem, i.e.
visual-line-mode refusing to break a word preceded by whitespace.
Quoting Clément :
> If breaking before a word doesn't prevent that word
> from being broken, it would seem better to not break before it. In
> other words, assuming 9 columns:
>
> Here breaking at ' ' is useful:
>
> Input:
> 123456789
> xxx aaaaaaa
>
> Visual-line mode (good)
> 123456789
> xxx
> aaaaaaa
>
> But not here:
>
> Input
> 123456789
> xxx aaaaaaaaaaaaa
>
> Visual-line mode (bad):
> 123456789
> xxx
> aaaaaaaaa
> aaaa
>
> What I'd expect:
> 123456789
> xxx aaaaa
> aaaaaaaa
Apologies if I've missed some subtleties.
[1] bug#31666#11
<99baa6b2-584f-789f-ecf8-d845aedd18ef@live.com>
https://lists.gnu.org/archive/html/bug-gnu-emacs/2018-05/msg00894.html