ls broken after merge of #1089 #1111

Closed
jenshnielsen opened this Issue Dec 7, 2011 · 5 comments

Projects

None yet

3 participants

@jenshnielsen

After the merge of #1089 ls in the qtconsole prints blank lines and not the contents of the dir.
On ubuntu 11.10 using python2.7

@minrk
Member
minrk commented Dec 7, 2011

This affects everything - '\r\n' is not being properly treated as a newline, because the carriage-return action is clearing the line.

@Carreau
Member
Carreau commented Dec 7, 2011

Confirmed, on mac os also. Havent done bisect but it's between 2f41c98 and bdcfcc6

@minrk
Member
minrk commented Dec 7, 2011

It's definitely the carriage return action. '\r' effectively clears a line, so '\r\n' line-endings (which come from pexpect - affecting all system calls on Unix, and all everything on Windows) effectively replace each line with '\n'. The proper action should be to catch '\r', as long as it is not followed by '\n'.

@minrk
Member
minrk commented Dec 7, 2011

PR #1118 should fix this

@jenshnielsen

That indeed fixed it and the test passes. Thanks

@minrk minrk added a commit that closed this issue Dec 9, 2011
@minrk minrk [qtconsole] carriage-return action matches CR only, not CRLF
CarriageReturn action introduced in #1089 clears a line in the qtconsole, which means that CRLF line endings would replace whole lines with '\n'.

This changes the regex to only match `\r` not followed by `\n` preventing the CR action from firing on CRLF.

Test included

closes #1111
814d5b9
@minrk minrk closed this in 814d5b9 Dec 9, 2011
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
@minrk minrk [qtconsole] carriage-return action matches CR only, not CRLF
CarriageReturn action introduced in #1089 clears a line in the qtconsole, which means that CRLF line endings would replace whole lines with '\n'.

This changes the regex to only match `\r` not followed by `\n` preventing the CR action from firing on CRLF.

Test included

closes #1111
c061f16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment