guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#29509] [PATCH 1/6] progress: Factorize erase-in-line.


From: Ludovic Courtès
Subject: [bug#29509] [PATCH 1/6] progress: Factorize erase-in-line.
Date: Fri, 15 Dec 2017 10:47:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Danny Milosavljevic <address@hidden> skribis:

>> +(define (erase-in-line port)
>> +  "Write an ANSI erase-in-line sequence to PORT to erase the whole line and
>> +move the cursor to the beginning of the line."
>> +  (display "\r\x1b[K" port))
>> +
>
> Hmm, with the "\r" in front it's more like erase-current-line, no? (f.e. the 
> order is different: move the cursor to the beginning of the line and then 
> erase the rest of the line - which then means: whole line)

Yes you’re right: it uses the “erase-in-line” ANSI sequence but what it
does is more appropriately described as “erase current line” (which is
what the docstring says.)

I’ve renamed it to ‘erase-current-line’.

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]