author | Richard Quirk <richard.quirk@gmail.com> | |
Fri, 20 Jun 2008 14:58:15 +0000 (16:58 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 21 Jun 2008 03:19:52 +0000 (23:19 -0400) | ||
commit | cead78edef6a2f1339f699cd7d656b6834707b94 | |
tree | db27c7cea89af43aef2884cb797ea9bae35208e8 | tree | snapshot |
parent | 8a965b8ee28bedc58641453e13d03f80180320dd | commit | diff |
git-gui: Fix accidental staged state toggle when clicking top pixel row
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.
Signed-off-by: Richard Quirk <richard.quirk@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
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.
Signed-off-by: Richard Quirk <richard.quirk@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |