You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, all the gui.commitmsgwidth config variable does is set the size of the commit message window, so users get a visual hint on when to manually wrap their text. A much better quality-of-life feature would be to wrap the text for the user.
Also, allow disabling the line wrap for people who don't want it.
Wrapping the display text of the commit message text box is easy to do. The -wrap option of the text widget can wrap the displayed text. I haven't looked too much into the option, but AFAIK it only soft-wraps the text.
So, we need to hard-wrap the text before passing it to the commit machinery. The main challenge is to make sure our wrapping algorithm works exactly like the text widget's wrap, otherwise the users would see one thing and the commit would contain something else.
It would also probably be a good idea to allow not wrapping a line. Maybe we can do something like mbox subject lines where if the first character of the line is a space, it is considered a part of the previous line.
An alternate implementation to using -wrap would be to run the text wrapping logic every time the user types something (probably by using tags). This would remove the need to match Tcl's word wrap implementation, but might have a performance hit.
The text was updated successfully, but these errors were encountered:
Right now, all the
gui.commitmsgwidth
config variable does is set the size of the commit message window, so users get a visual hint on when to manually wrap their text. A much better quality-of-life feature would be to wrap the text for the user.Also, allow disabling the line wrap for people who don't want it.
Wrapping the display text of the commit message text box is easy to do. The
-wrap
option of the text widget can wrap the displayed text. I haven't looked too much into the option, but AFAIK it only soft-wraps the text.So, we need to hard-wrap the text before passing it to the commit machinery. The main challenge is to make sure our wrapping algorithm works exactly like the text widget's wrap, otherwise the users would see one thing and the commit would contain something else.
It would also probably be a good idea to allow not wrapping a line. Maybe we can do something like mbox subject lines where if the first character of the line is a space, it is considered a part of the previous line.
An alternate implementation to using
-wrap
would be to run the text wrapping logic every time the user types something (probably by using tags). This would remove the need to match Tcl's word wrap implementation, but might have a performance hit.The text was updated successfully, but these errors were encountered: