Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] use clear-to-end to reduce trailing whitespace
- X-seq: zsh-workers 53317
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Colascione <dancol@xxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] use clear-to-end to reduce trailing whitespace
- Date: Mon, 20 Jan 2025 10:20:51 -0800
- Archived-at: <https://zsh.org/workers/53317>
- In-reply-to: <875xma9xad.fsf@dancol.org>
- List-id: <zsh-workers.zsh.org>
- References: <87ed121ui4.fsf@dancol.org> <CAH+w=7bXVUpVVZ-wauCQTchCJK60zaqCSZUV+KKQ93tNoe2VDQ@mail.gmail.com> <CAH+w=7aWgKLzQ6MZfsyEYabdGic0qX6tfsC4HX4g8vBAW-+Lpw@mail.gmail.com> <875xma9xad.fsf@dancol.org>
On Sun, Jan 19, 2025 at 3:52 PM Daniel Colascione <dancol@xxxxxxxxxx> wrote:
>
> The attached new version of the patch should handle right prompts too. I
> tested it with both zero and non-zero right prompt margins.
Thanks, a couple of remaining notes:
Your patch has Windows CRLF line endings, so won't apply cleanly to
the base source, which has only UNIX/Linux LF line endings.
Please don't use ".diff", ".patch", etc. extensions on attachments. I
know it's a little annoying given proclivities of email clients and
IDEs, but we (and the archive software) prefer plain text attachments
-- please either force Content-Type: text/plain or use a ".txt"
extension.
> I also tested a bunch of terminals. I was unable to get any of them to
> mistakenly scroll due to issuing a clear-to-end-of-line at the right
> edge of the screen.
Thanks. Re-reading more closely the comment "2:" that you edited,
another test case would be:
* The cursor is somewhere above the bottom of the screen, and
* the current line is exactly filled with text (even if possibly whitespace), so
* therefore the terminal has already auto-margin'd to the next line, and
* consequently emitting CEOL would erase the line below the expected
line, which may clobber residual text from previous output
There was a discussion about use of CEOS back in
https://zsh.org/users/29197 for which there are already workarounds
(mentioned in subsequent thread). There may be a similar issue here.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author