From 8520c4bdd9c8a3ef96d9a0fd4f5a5f396a218268 Mon Sep 17 00:00:00 2001 From: Tomasz Janeczko Date: Mon, 23 Sep 2013 21:03:26 +0200 Subject: [PATCH] Changed Complete.tmCommand to accept TM_GOCODE path with spaces. The breaking scenario is when user puts gocode exec file to ~/Library/Application Support/Textmate/{etc. etc.}. --- Commands/Complete.tmCommand | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands/Complete.tmCommand b/Commands/Complete.tmCommand index 9a9aa72..14c63ac 100644 --- a/Commands/Complete.tmCommand +++ b/Commands/Complete.tmCommand @@ -20,7 +20,7 @@ end # byte offset of cursor position from the beginning of file cursor = document[ 0, ENV['TM_LINE_NUMBER'].to_i - 1].join().length + ENV['TM_LINE_INDEX'].to_i -output = `$TM_GOCODE -f=csv -in=#{e_sh ENV['TM_FILEPATH']} autocomplete #{cursor}` +output = `"$TM_GOCODE" -f=csv -in=#{e_sh ENV['TM_FILEPATH']} autocomplete #{cursor}` # quit if no completions found TextMate.exit_show_tool_tip("No completions found.") if output.length == 0