patch 8.2.1942: insufficient test coverage for the Netbeans interface

Problem:    Insufficient test coverage for the Netbeans interface.
Solution:   Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan,
            closes #7240)
diff --git a/src/mouse.c b/src/mouse.c
index 7b1bedc..10b991b 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -2929,10 +2929,12 @@
 
     // skip line number and fold column in front of the line
     col -= win_col_off(win);
-    if (col < 0)
+    if (col <= 0)
     {
 #ifdef FEAT_NETBEANS_INTG
-	netbeans_gutter_click(lnum);
+	// if mouse is clicked on the gutter, then inform the netbeans server
+	if (*colp < win_col_off(win))
+	    netbeans_gutter_click(lnum);
 #endif
 	col = 0;
     }