Skip to content
Permalink
Browse files

switch to the new .actuate command

this fixes #868
  • Loading branch information
DisposaBoy committed Oct 6, 2018
1 parent 0383863 commit 86d5c11a23dd837d25310809bbb42d156437dd94
Showing with 15 additions and 13 deletions.
  1. +1 −1 Default (Linux).sublime-keymap
  2. +1 −1 Default (OSX).sublime-keymap
  3. +1 −1 Default (Windows).sublime-keymap
  4. +2 −2 GoSublime.sublime-commands
  5. +10 −8 gsev.py
@@ -78,7 +78,7 @@
{
"keys": ["ctrl+.", "ctrl+g"],
"command": "gs9o_open",
"args": {"run": ["goto.definition"], "focus_view": false, "show_view": false},
"args": {"run": [".actuate"], "focus_view": false, "show_view": false},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }]
},
{
@@ -72,7 +72,7 @@
{
"keys": ["super+.", "super+g"],
"command": "gs9o_open",
"args": {"run": ["goto.definition"], "focus_view": false, "show_view": false},
"args": {"run": [".actuate"], "focus_view": false, "show_view": false},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }]
},
{
@@ -78,7 +78,7 @@
{
"keys": ["ctrl+.", "ctrl+g"],
"command": "gs9o_open",
"args": {"run": ["goto.definition"], "focus_view": false, "show_view": false},
"args": {"run": [".actuate"], "focus_view": false, "show_view": false},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }]
},
{
@@ -64,8 +64,8 @@
},
{
"caption": "GoSublime: Goto Definition",
"command": "gs_doc",
"args": {"mode": "goto"}
"command": "gs9o_open",
"args": {"run": ["goto.definition"], "focus_view": false, "show_view": false},
},
{
"caption": "GoSublime: Show documentation hint",
18 gsev.py
@@ -61,21 +61,23 @@ class GsOnLeftClick(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
if gs.is_go_source_view(view):
if not gstest.handle_action(view, 'left-click'):
view.run_command('gs9o_open', {
"run": ["goto.definition"],
"focus_view": False,
"show_view": False,
})
view.run_command('gs9o_open', {
"run": [".actuate", "-button=left"],
"focus_view": False,
"show_view": False,
})
elif view.score_selector(gs.sel(view).begin(), "text.9o") > 0:
view.window().run_command("gs9o_open_selection")

class GsOnRightClick(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
if gs.is_go_source_view(view):
if not gstest.handle_action(view, 'right-click'):
view.run_command('gs_doc', {"mode": "hint"})
view.run_command('gs9o_open', {
"run": [".actuate", "-button=right"],
"focus_view": False,
"show_view": False,
})

def do_post_save(view):
if not gs.is_pkg_view(view):

0 comments on commit 86d5c11

Please sign in to comment.