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

Re: [PATCH] git-gui: Fix accidental staged state toggle when clicking top pixel row

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 20, 2008, 15:26 UTC
Message-ID
<485BCC38.1000403@viscovery.net>
In-Reply-To
<1213973895-10264-1-git-send-email-richard.quirk@gmail.com>
Richard Quirk schrieb:
Show 7 quoted lines
> If a text widget is asked the index at x,y with y == 0 or y == 1 it will
> always return 1.0 as the nearest index, regardless of the x position.
> 
> This means that clicking the top 2 pixels of the Unstaged/Staged Changes
> lists caused the state of the file there to be toggled. This patch
> checks that the pixel clicked is greater than 1, so there is less chance
> of accidentally staging or unstaging changes.

Ah, that would explain why it sometimes happened that a file was staged even though the mouse pointer was no where near the icon!

-- Hannes
Previous: Richard QuirkNext: Shawn O. Pearce
Message 2 of 3 in “git-gui: Fix accidental staged state toggle when clicking top pixel row”
  1. git-gui: Fix accidental staged state toggle when clicking top pixel rowRichard Quirk, Jun 20, 2008
  2. Johannes SixtJun 20, 2008
  3. Shawn O. PearceJun 21, 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.