Merge lp:~ryan.wooden/ultisnips/fix713439 into lp:~sirver/ultisnips/trunk

Proposed by Ryan Wooden
Status: Merged
Merged at revision: 239
Proposed branch: lp:~ryan.wooden/ultisnips/fix713439
Merge into: lp:~sirver/ultisnips/trunk
Diff against target: 32 lines (+5/-6)
2 files modified
plugin/UltiSnips.vim (+2/-6)
plugin/UltiSnips/__init__.py (+3/-0)
To merge this branch: bzr merge lp:~ryan.wooden/ultisnips/fix713439
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+48680@code.launchpad.net

Description of the change

Fixes Bug #713439, by just adding a couple returns in expand_anon. I also included a patch to add the plugin directory to sys.path in a nicer way. All the tests still pass on my system.

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

I have no opinion about the return fix. I dig the searchpath fix though! Nice work, as always :). I'll reply to your other bug report with the features tomorrow.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/UltiSnips.vim'
2--- plugin/UltiSnips.vim 2010-12-18 17:07:46 +0000
3+++ plugin/UltiSnips.vim 2011-02-05 00:20:43 +0000
4@@ -188,12 +188,8 @@
5 python << EOF
6 import vim, os, sys
7
8-for p in vim.eval("&runtimepath").split(','):
9- dname = p + os.path.sep + "plugin"
10- if os.path.exists(dname + os.path.sep + "UltiSnips"):
11- if dname not in sys.path:
12- sys.path.append(dname)
13- break
14+new_path = vim.eval('expand("<sfile>:h")')
15+sys.path.append(new_path)
16
17 from UltiSnips import UltiSnips_Manager
18 UltiSnips_Manager.expand_trigger = vim.eval("g:UltiSnipsExpandTrigger")
19
20=== modified file 'plugin/UltiSnips/__init__.py'
21--- plugin/UltiSnips/__init__.py 2010-12-18 17:07:46 +0000
22+++ plugin/UltiSnips/__init__.py 2011-02-05 00:20:43 +0000
23@@ -665,6 +665,9 @@
24
25 if snip.matches(before):
26 self._do_snippet(snip, before, after)
27+ return True
28+ else:
29+ return False
30
31 def clear_snippets(self, triggers = [], ft = "all"):
32 if ft in self._snippets:

Subscribers

People subscribed via source and target branches