Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Listening mouseup for single click! an less presure for on_selection_…

…modified
  • Loading branch information...
commit fbf781f8485faa4a679e8aa036c9462707d0c9d5 1 parent 3a07c84
Tito authored January 08, 2012
9  Default (Linux).sublime-mousemap
@@ -4,12 +4,17 @@
4 4
 		"button": "button1", "count": 2,
5 5
 		"press_command": "drag_select",
6 6
 		"press_args": {"by": "words"},
7  
-		"command": "word_highlight_double_click"
  7
+		"command": "word_highlight_click"
8 8
 	},
9 9
 	{
10 10
 		"button": "button1", "count": 2, "modifiers": ["ctrl"],
11 11
 		"press_command": "drag_select",
12 12
 		"press_args": {"by": "words", "additive": true},
13  
-		"command": "word_highlight_double_click"
  13
+		"command": "word_highlight_click"
  14
+	},
  15
+	{
  16
+		"button": "button1", "count": 1,
  17
+		"press_command": "drag_select",
  18
+		"command": "word_highlight_click"
14 19
 	}
15 20
 ]
9  Default (OSX).sublime-mousemap
@@ -4,12 +4,17 @@
4 4
 		"button": "button1", "count": 2,
5 5
 		"press_command": "drag_select",
6 6
 		"press_args": {"by": "words"},
7  
-		"command": "word_highlight_double_click"
  7
+		"command": "word_highlight_click"
8 8
 	},
9 9
 	{
10 10
 		"button": "button1", "count": 2, "modifiers": ["super"],
11 11
 		"press_command": "drag_select",
12 12
 		"press_args": {"by": "words", "additive": true},
13  
-		"command": "word_highlight_double_click"
  13
+		"command": "word_highlight_click"
  14
+	},
  15
+	{
  16
+		"button": "button1", "count": 1,
  17
+		"press_command": "drag_select",
  18
+		"command": "word_highlight_click"
14 19
 	}
15 20
 ]
9  Default (Windows).sublime-mousemap
@@ -4,12 +4,17 @@
4 4
 		"button": "button1", "count": 2,
5 5
 		"press_command": "drag_select",
6 6
 		"press_args": {"by": "words"},
7  
-		"command": "word_highlight_double_click"
  7
+		"command": "word_highlight_click"
8 8
 	},
9 9
 	{
10 10
 		"button": "button1", "count": 2, "modifiers": ["ctrl"],
11 11
 		"press_command": "drag_select",
12 12
 		"press_args": {"by": "words", "additive": true},
13  
-		"command": "word_highlight_double_click"
  13
+		"command": "word_highlight_click"
  14
+	},
  15
+	{
  16
+		"button": "button1", "count": 1,
  17
+		"press_command": "drag_select",
  18
+		"command": "word_highlight_click"
14 19
 	}
15 20
 ]
6  word_highlight.py
@@ -51,12 +51,14 @@ def run(self, edit):
51 51
 		for w in wh:
52 52
 			self.view.sel().add(w)
53 53
 
54  
-class WordHighlightDoubleClickCommand(sublime_plugin.TextCommand):
  54
+
  55
+class WordHighlightClickCommand(sublime_plugin.TextCommand):
55 56
 	def run(self, edit):
56 57
 		view = self.view
57 58
 		if Pref.enabled and not view.settings().get('is_widget'):
58 59
 			WordHighlightListener().highlight_occurences(view)
59 60
 
  61
+
60 62
 class WordHighlightListener(sublime_plugin.EventListener):
61 63
 
62 64
 	def on_activated(self, view):
@@ -69,7 +71,7 @@ def on_activated(self, view):
69 71
 	def on_selection_modified(self, view):
70 72
 		if Pref.enabled and not view.settings().get('is_widget'):
71 73
 			now = time.time()
72  
-			if now - Pref.timing > 0.06:
  74
+			if now - Pref.timing > 0.08:
73 75
 				Pref.timing = now
74 76
 				self.highlight_occurences(view)
75 77
 			else:

0 notes on commit fbf781f

Please sign in to comment.
Something went wrong with that request. Please try again.