One minor modification to help with double-clicking as well:

--- ./commit.js 2009-09-09 16:15:01.000000000 -0400
+++ /Applications/GitX.app/Contents/Resources/html/views/commit/
commit.js       2009-09-09 16:22:43.000000000 -0400
@@ -83,7 +83,6 @@
                deselect();
                currentSelection = false;
        }
-       document.onselectstart = function () {return false;}; /* prevent
normal text selection */

        var list = document.getElementsByClassName("lines");

@@ -99,6 +98,11 @@
        for (i = 0; i < list.length; ++i) {
                var file = list[i];
                file.ondblclick = function (event) {
+                       if (event.altKey) {
+                               return true;
+                       } else {
+                               window.getSelection().removeAllRanges();
+                       }
                        var file = event.target.parentNode;
                        if (file.id = "selected")
                                file = file.parentNode;
@@ -113,6 +117,11 @@
                };

                file.onmousedown = function(event) {
+                       if (event.altKey) {
+                               return true;
+                       } else {
+                               window.getSelection().removeAllRanges();
+                       }
                        if (event.which != 1)
                                return false;
                        var elem_class = event.target.getAttribute("class")

Reply via email to