New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't allow linefeeds in the commit summary message text field #212

Closed
grandinj opened this Issue Dec 4, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@grandinj

grandinj commented Dec 4, 2013

I accidentally cut and pasted a linefeed into the commit summary message field, which resulted in an error dialog.

It should probably be filtering linefeeds out, either at paste time, or before calling the git executable.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Dec 10, 2013

Member

were you on windows? I pasted in some newline characters and I was able to commit the message. I can add a validator that prevents newlines from ever entering the field; this will effectively block the paste action if it contains a newline.

Member

davvid commented Dec 10, 2013

were you on windows? I pasted in some newline characters and I was able to commit the message. I can add a validator that prevents newlines from ever entering the field; this will effectively block the paste action if it contains a newline.

@grandinj

This comment has been minimized.

Show comment
Hide comment
@grandinj

grandinj Dec 10, 2013

This was Fedora Linux.
I had selected some text from a console window and pasted it.

I'm using VNC to access that box which might make the text selection
process a little different.

grandinj commented Dec 10, 2013

This was Fedora Linux.
I had selected some text from a console window and pasted it.

I'm using VNC to access that box which might make the text selection
process a little different.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Dec 10, 2013

Member

Thanks. The usability of the user doing paste and then it getting blocked by a validator would not be great either since it'll just be "mysteriously not pasting".

It seems like the ideal thing would be for paste (which Qt does not let us override; that method is not virtual) to grab the pasted text and shuffle all subsequent lines over to the extended description field. I'll see if we can do something like that; unfortunately that's a lot more complicated then the two-line QRegExpValidator solution.

Member

davvid commented Dec 10, 2013

Thanks. The usability of the user doing paste and then it getting blocked by a validator would not be great either since it'll just be "mysteriously not pasting".

It seems like the ideal thing would be for paste (which Qt does not let us override; that method is not virtual) to grab the pasted text and shuffle all subsequent lines over to the extended description field. I'll see if we can do something like that; unfortunately that's a lot more complicated then the two-line QRegExpValidator solution.

@grandinj

This comment has been minimized.

Show comment
Hide comment
@grandinj

grandinj Dec 10, 2013

That would be an awesome solution, but I would also be perfectly happy with
stripping line feeds before calling the gut executable. The line feeds are
invisible when pasted into a single line field, so that would match what I
can "see".

grandinj commented Dec 10, 2013

That would be an awesome solution, but I would also be perfectly happy with
stripping line feeds before calling the gut executable. The line feeds are
invisible when pasted into a single line field, so that would match what I
can "see".

@davvid davvid closed this in 90b125c Dec 10, 2013

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