protect CRLF from carriage-return action #1118

Merged
merged 1 commit into from Dec 9, 2011

Projects

None yet

1 participant

@minrk
IPython member

Carriage return action introduced in PR #1089 clears a line in the qtconsole, which means that CRLF line endings would replace whole lines with '\n', thus hiding the output of ls and ~all system calls.

This changes the behavior to only act on CR if it is not followed by LF.

Test included.

closes #1111

@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
IPython member

updated to just change the regex to match \r not followed by \n

@minrk minrk merged commit 814d5b9 into ipython:master Dec 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment