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

[PATCH 0/2] gitk: text wrapping in ctext (commit headers, subject, and body)

From
CGChristoph Sommer via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 9, 2024, 18:08 UTC
Message-ID
<pull.1835.git.1733767737.gitgitgadget@gmail.com>

Using gitk to view diffs of source code without hard linebreaks is a bit painful without dynamic word wrapping, for which I could not find a preference. The only related one I found was for wrapping the commit subject (called a comment in the source code, I guess), and that did not seem to be reconfigurable in a running gitk.

On the off chance that such features might also be useful to somebody else I am sharing them publicly, as two semi-related changes:

gitk: add text wrapping preferences ===================================

Add a new preference "wrapdefault" which allows enabling char/word wrap. Impacts all text in the ctext widget for which no other preference exists.

Also make the (existing) preference "wrapcomment" configurable graphically. Its setting impacts only the "comment" part of the ctext widget.

gitk: make headings of preferences bold =======================================

Make preference groups like "Diff display options" stand out more.
Christoph Sommer (2):
  gitk: make headings of preferences bold
  gitk: add text wrapping preferences
 gitk-git/gitk | 45 ++++++++++++++++++++++++++++++++-------------
 1 file changed, 32 insertions(+), 13 deletions(-)
base-commit: e66fd72e972df760a53c3d6da023c17adfc426d6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1835%2Fsommer%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1835/sommer/master-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1835
-- 
gitgitgadget
Next: Christoph Sommer via GitGitGadget
Message 1 of 5 in “gitk: text wrapping in ctext (commit headers, subject, and body)”
  1. 0/2 gitk: text wrapping in ctext (commit headers, subject, and body)Christoph Sommer via GitGitGadget, Dec 9, 2024
  2. 1/2 gitk: make headings of preferences boldChristoph Sommer via GitGitGadget, Dec 9, 2024
  3. Johannes SixtDec 12, 2024
  4. 2/2 gitk: add text wrapping preferencesChristoph Sommer via GitGitGadget, Dec 9, 2024
  5. Johannes SixtDec 12, 2024

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.