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

From: [email-masked] (Ludovic Courtès)
Date: Fri, 15 Dec 2017 10:47:56 +0100

Danny Milosavljevic <[email-masked]> 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’.