diff options
authorRemy Suen2010-05-13 18:52:47 (EDT)
committer Remy Suen2010-05-13 18:52:47 (EDT)
commitf82d1a0dbfde2fa2ce5d971773a554ee694ac408 (patch)
parent708aa2d18f58c7a9655045b6fe5d0483fde89e6e (diff)
Ignore secondary mouse clicks in the 'History' view's hyperlinksrefs/changes/98/698/1
Only the primary mouse click should be acknowledged as a request to jump to another commit when browsing commits in the 'History' view. At the moment, users that want to select the commit id and copy the id to the clipboard through the context menu might actually end up jumping to the selected commit as the secondary mouse click is processed as a hyperlink request. Change-Id: I8351cbda039419160e6731e307fa7243a3be90d4
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/
index d19aacb..6f80fa6 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/
@@ -107,6 +107,11 @@ class CommitMessageViewer extends TextViewer implements ISelectionChangedListene
t.addMouseListener(new MouseAdapter() {
public void mouseDown(final MouseEvent e) {
+ // only process the hyperlink if it was a primary mouse click
+ if (e.button != 1) {
+ return;
+ }
final int o;
try {
o = t.getOffsetAtLocation(new Point(e.x, e.y));