Re: [PATCH] git gui: visually wrap lines of commit message
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 10, 2008, 02:25 UTC
- Message-ID
- <20080810022504.GA22137@spearce.org>
- In-Reply-To
- <20080809224150.GA21530@localhost>
Clemens Buchacher <drizzd@aon.at> wrote:
Show 10 quoted lines
> On Sun, Aug 10, 2008 at 12:14:13AM +0200, Johannes Sixt wrote: > > > Currently you don't see the whole message anyways if the box is too small > > > for the text. I find that quite annoying, especially since there are > > > neither keys nor a scrollbar to scroll horizontally. > > > > In this case, I use the middle mouse button to pan around. And then I do > > see what I will get. > > Ok, that's not bad. But nevertheless I think we should at least add a > scrollbar.
I thought the scrollbar took up too much vertical space, so I did not want to put in a horizontal scrollbar on a box that never should require horizontal scrolling. As Johannes points out...
Show 7 quoted lines
> > The width of the box was chosen wisely: It takes a bit less than 80 > > columns, to leave room for quoting in emails and to avoid wrapping of git > > log output. > > Maybe I'm doing something wrong, but on my system (wish8.5) the box width > changes with the window size, and gui.commitmsgwidth appears to be ignored. > Even if I close and restart git gui, the old window size is kept.
That's a bug, and I now understand why you have a problem. That box should not be resizing itself. Its supposed to be using a fixed width font, and have a fixed number of columns, so you can format a message including drawing ASCII art to explain yourself clearly as you write a change.
I'll consider a patch that fixes the box so it doesn't resize under 8.5, but I won't apply one that applies virtual line wrapping as then we lose the what-you-see-is-what-you-get property of the editor, and that is a very important property for git-gui users.
-- Shawn.