From: Sergey Vlasov Date: Mon, 15 May 2006 15:06:19 GMT Subject: Re: [PATCH] gitk: Display commit messages with word wrap Message-ID: <20060515150619.GC19254@master.mivlgu.local> In-Reply-To: <17511.48749.631725.358279@cargo.ozlabs.ibm.com> On Mon, May 15, 2006 at 09:34:05AM +1000, Paul Mackerras wrote: > Sergey Vlasov writes: > > > Some people put very long strings into commit messages, which then > > become invisible in gitk (word wrapping in the commit details window is > > turned off, and there is no horizontal scroll bar). Enabling word wrap > > for just the commit message looks much better. > > Well... you can scroll in any direction with mouse button 2, but ok... I completely forgot about this obscure feature of Tk (and is it only me who thinks that it scrolls in the wrong direction?). > > + $ctext insert end "\n" {} > > Why are you adding the superfluous {} ? Because I was paranoid about not letting the tag leak into subsequent text... but apparently this does not happen even without that {}, so I'll remove it. > > - set comment {} > > + set headers {} > > Why are you changing the name here? Your commit description doesn't > address either of these points. Previously the "comment" variable contained both the commit headers ("Parent:" and "Child:" lines) and the commit message, and all this text was inserted into $ctext by a single call to "appendwithlinks". Now I need to insert these parts separately (wrapped "Parent:" and "Child:" lines look bad, I want to wrap only the commit message), therefore only headers are collected in that variable - so I renamed it to reflect this new usage. I'll send the updated patch in a separate message.