Bug #182

avatar

New I/O mechanisms print "extra" blank lines on \r

Added by Jeff Forcier 79 days ago. Updated 57 days ago.

Status:Worksforme Start:06/21/2010
Priority:Normal Due date:
Assigned to:avatarJeff Forcier % Done:

0%

Category:UI
Target version:1.0

Description

When rewriting the I/O loop I had it print the line prefix after any line ending, meaning \n OR \r. I believe I did this because even during testing I ran into cases where a \r was present without a \n, though I'm not sure. It may have simply been pre-emptive on the assumption that somewhere, some program might be using \r as a newline terminator, or someone might be cat-ing such a file.

However, because at least some applications — such as colorized ls output — appear to use \r as, well, a carriage return without a newline, we end up with spurious blank, prefixed lines. This looks pretty bizarre, if not downright ugly.

Now, given that the captured text shouldn’t have this problem (since the only issue here is that we’re printing an extra prefix) it may not be a problem other than cosmetically, but even so, investigate whether a carriage return should be considered a valid line terminator on its own for our prefix-printing purposes. I'm thinking it shouldn’t be.


Related issues

related to Feature #7 Improved prompt detection and passthrough Done 07/20/2009

History

Updated by Jeff Forcier 57 days ago

avatar
  • Status changed from New to Assigned

I can’t seem to replicate this now, and upon reflection I'm not sure why exactly the described setup would even be something we could defend against — if it’s creating an actual newline, doesn’t that imply that a \n did exist too? (Or was it that since we printed something — the prefix — after the \r, it was unable to redraw the line correctly, giving the appearance of a “real” newline? no real idea here)

Closing for now, if I see it again in my travels I’ll reopen.

Updated by Jeff Forcier 57 days ago

avatar
  • Status changed from Assigned to Worksforme

Also available in: Atom