git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Clemens BuchacherNext: Lars Noschinski
Message 6 of 9 in “git gui: visually wrap lines of commit message”
  1. git gui: visually wrap lines of commit messageClemens Buchacher, Aug 9, 2008
  2. Johannes SixtAug 9, 2008
  3. Clemens BuchacherAug 9, 2008
  4. Johannes SixtAug 9, 2008
  5. Clemens BuchacherAug 9, 2008
  6. Shawn O. PearceAug 10, 2008
  7. Lars NoschinskiAug 10, 2008
  8. Shawn O. PearceAug 10, 2008
  9. Clemens BuchacherAug 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.