We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentad7a3b3 commitce87975Copy full SHA for ce87975
AUTHORS
@@ -23,6 +23,7 @@ Contributors:
23
* Lowe Thiderman (thiderman);
24
* Martin Brochhaus (mbrochh);
25
* Matthew Moses (mlmoses);
26
+* Mel Boyce (syngin)
27
* Mohammed (mbadran);
28
* Naoya Inada (naoina);
29
* Pedro Algarvio (s0undt3ch);
Makefile
@@ -11,7 +11,6 @@ clean:
11
# Temporary disable rope tests on Travis
12
.PHONY: travis
13
travis:
14
-rm -rf t/rope.vim
15
raketest
16
17
.PHONY: test
pymode/environment.py
@@ -77,7 +77,11 @@ def var(self, name, to_bool=False):
77
returnvalue
78
79
defmessage(self,msg,history=False):
80
-""" Show message to user. """
+""" Show message to user.
81
+
82
+ :return: :None
83
84
+ """
85
86
ifhistory:
87
returnvim.command('echom "%s"'%str(msg))
@@ -188,14 +192,16 @@ def let(self, name, value):
188
192
self.debug(cmd)
189
193
vim.command(cmd)
190
194
191
-defprepare_value(self,value):
195
+defprepare_value(self,value,dumps=True):
196
""" Decode bstr to vim encoding.
197
198
:return unicode string:
199
200
"""
201
-value=json.dumps(value)
202
+ifdumps:
203
+value=json.dumps(value)
204
205
ifPY2:
206
value=value.decode('utf-8').encode(self.options.get('encoding'))
207
pymode/rope.py
@@ -85,7 +85,9 @@ def complete(dot=False):
s_offset=codeassist.starting_offset(source,offset)
p_prefix=prefix[offset-s_offset:]
line=env.lines[row-1]
88
-env.curbuf[row-1]=line[:col]+p_prefix+line[col:]# noqa
+cline=line[:col]+p_prefix+line[col:]
89
+ifcline!=line:
90
+env.curbuf[row-1]=env.prepare_value(cline,dumps=False)
91
env.current.window.cursor= (row,col+len(p_prefix))
92
env.run('complete',col-len(prefix)+len(p_prefix)+1,proposals)
93
returnTrue
@@ -887,7 +889,8 @@ def _insert_import(name, module, ctx):
887
889
source,_=env.get_offset_params()
888
890
lineno=ctx.importer.find_insertion_line(source)
891
line='from %s import %s'% (module,name)
-env.curbuf[lineno-1:lineno-1]= [line]
892
+env.curbuf[lineno-1:lineno-1]= [
893
+env.prepare_value(line,dumps=False)]
894
895
896
pyobject=ctx.project.pycore.resource_to_pyobject(ctx.resource)
t/rope.vim
@@ -17,6 +17,11 @@ describe 'pymode-plugin'
end
18
19
it'pymode rope auto open project in current working directory'
20
21
+if$TRAVIS!=""
22
+ SKIP'Travis fails on this test'
+endif
let project_path=getcwd() .'/.ropeproject'
Expectisdirectory(project_path)==0
normal oimporX