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

Feature request: Add word wrapping to gitk display

From
ANAilin Nemui <ailin.nemui@gmail.com>
Date
May 1, 2016, 09:37 UTC
Message-ID
<1462095472.542.2.camel@gmail.com>
Hi,

when working on text files with long lines, "word diff" can produce appropriate diff display. However, the long lines cannot be viewed very well in gitk (requires excessive scrolling).

I found out that it is quite easy to achieve this
index 805a1c7..5ba7472 100755
--- a/gitk
+++ b/gitk
@@ -2404,7 +2404,7 @@ proc makewindow {} {
     set ctext .bleft.bottom.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
        -state disabled -font textfont \
-       -yscrollcommand scrolltext -wrap none \
+       -yscrollcommand scrolltext -wrap word \
        -xscrollcommand ".bleft.bottom.sbhorizontal set"
     if {$have_tk85} {
        $ctext conf -tabstyle wordprocessor


however I'm not otherwise knowledgeable about Tk to make this a
properly configurable switch. I think it would be a very nice addition
to have, a check box next to "Line diff/ color words" that says "Wrap
words in display".


Thanks,
Nei
Message 1 of 1 in “Feature request: Add word wrapping to gitk display”
  1. Ailin NemuiMay 1, 2016

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.