Repository navigation
Conversation
the text area for the commit message has line wrap enabled while also showing a red line as recommended line length limit. The actual text which is committed is simply based on getText() atm which does not take line wrap into account. This can lead to unintended "single line" commit messages or a combination of custom and auto-wrapped text. This computes the line wrapped text as seen in the text area and uses it for the commit message.
|
I think disabling linewrap is the better approach and this is IMHO broken. I think we have this nowhere in the IDE (guess the intention of the users based on the width of the display window). What is more oneline commits just turn into differently broken commits. They'll turn from to both are broken. So from my POV this should be closed given, that the alternative was merged. |
|
the idea is that it commits what you see in the editor - given that the editor has a linewrap marker (technically two, both are configurable via properties) you would expect exactly that. Otherwise the red line would not make sense if the view does not match the model - and lead to unexpected results in the log. I am aware that this has a little bug I opened it for testing purposes and to show that I explored the alternative. Disabling line wrap was the hot fix. Wanted to try to fix it properly too. Disabling line wrap maintains the same promise to commit what you see, it is just slightly less convenient. I don't really have strong opinions here. Would have been nice-to-have. I disagree that this is conceptually broken. The red line is there, user can decide where to line wrap. E.g user might format most of the msg automatically (e.g first lines), then paste something which should be auto wrapped based on box size. As long "what you see is what you get" is maintained its fine. |
|
As this is still open and I consider an editor not doing what I expect broken. I voice my -1 on this. |
|
@matthiasblaesing did it do what you expect when line wrap was enabled? |
|
Yes, it was broken before, but I do agree with @matthiasblaesing that the other fix is the right one (and the simpler one). |
|
wanted to turn it off if the user home matches the string found in the CSS grammar file |
wrong PR? |
the text area for the commit message has line wrap enabled while also showing a red line as recommended line length limit. The actual text which is committed is simply based on
getText()atm which does not take line wrap into account. This can lead to unintended "single line" commit messages or a combination of custom and auto-wrapped text.This computes the line wrapped text as seen in the text area and uses it for the commit message.
Alternative approach would be to simply disable line wrap which we should consider too IMO. Esp since this is difficult to unit test. (#9703)
test helper:
Details