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

[PATCH 0/2] gitk: include y coord in recorded sash position

From
HGHalil Sen via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 20, 2022, 19:47 UTC
Message-ID
<pull.1219.git.git.1645386457.gitgitgadget@gmail.com>

This PR fixes the issue reported by Anders Kaseorg in 1 [https://public-inbox.org/git/1f6e179c-d9c3-e503-3218-0acf4ff27cca@mit.edu/].

6cd80496e9 ("gitk: Resize panes correctly when reducing window size", 2020-10-03) introduces a mechanism to record previously-set sash positions to make sure that correct values are used while computing resize proportions.

However, if we are not using ttk, then sash represents only the x coordinate and the recorded sash (oldsash) only includes the x coordinate. When we need to access the y coordinate via the recorded sash position, we generate the following Application Error popup:

    Error: expected integer but got ""
    
    expected integer but got ""
    
    expected integer but got ""
    
         while executing
    
    "$win sash place 0 $sash0 [lindex $s0 1]"
    
         (procedure "resizeclistpanes" line 38)
    
         invoked from within
    
    "resizeclistpanes .tf.histframe.pwclist 2818"
    
         (command bound to event)

To fix this, if we are not using ttk, we append the sash positions with the y coordinates before recording them to match the use_ttk case.

halilsen (2):
  gitk: trivial indentation fix
  gitk: include y coord in recorded sash position
 gitk-git/gitk | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
base-commit: e6ebfd0e8cbbd10878070c8a356b5ad1b3ca464e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1219%2Fsenhalil%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1219/senhalil/master-v1
Pull-Request: https://github.com/git/git/pull/1219
-- 
gitgitgadget
Next: halilsen via GitGitGadget
Message 1 of 3 in “gitk: include y coord in recorded sash position”
  1. 0/2 gitk: include y coord in recorded sash positionHalil Sen via GitGitGadget, Feb 20, 2022
  2. 1/2 gitk: trivial indentation fixhalilsen via GitGitGadget, Feb 20, 2022
  3. 2/2 gitk: include y coord in recorded sash positionhalilsen via GitGitGadget, Feb 20, 2022

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.