Skip to content

Commit 626a3a9

Browse files
committed
Merge branch 'release/0.7.8b'
2 parents 9b31972 + 8725442 commit 626a3a9

File tree

9 files changed

+31
-16
lines changed

9 files changed

+31
-16
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Contributors:
2323
* Lowe Thiderman (thiderman);
2424
* Martin Brochhaus (mbrochh);
2525
* Matthew Moses (mlmoses);
26+
* Mel Boyce (syngin)
2627
* Mohammed (mbadran);
2728
* Naoya Inada (naoina);
2829
* Pedro Algarvio (s0undt3ch);

Changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
## 2013-12-04 0.7.7b
4+
## 2013-12-04 0.7.8b
55
--------------------
66
* Update indentation support;
77
* Python3 support;

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ clean:
1111
# Temporary disable rope tests on Travis
1212
.PHONY: travis
1313
travis:
14-
rm -rf t/rope.vim
1514
rake test
1615

1716
.PHONY: test

doc/pymode.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(__) (__) (__) (_) (_)(_____)(_)\_) (_/\/\_)(_____)(____/(____) ~
77

88

9-
Version: 0.7.7b
9+
Version: 0.7.8b
1010

1111
==============================================================================
1212
CONTENTS *pymode-contents*
@@ -312,7 +312,7 @@ after them 'C' and ...
312312
>
313313
let g:pymode_lint_sort = []
314314
315-
Auto open cwindow (quickfix) if any errors has been finded
315+
Auto open cwindow (quickfix) if any errors have been found
316316
*'g:pymode_lint_cwindow'*
317317
>
318318
let g:pymode_lint_cwindow = 1
@@ -335,7 +335,7 @@ Definitions for |signs|
335335
3. Rope support ~
336336
*pymode-rope*
337337

338-
Pymode support Rope refactoring operations, code completion and code assists.
338+
Pymode supports Rope refactoring operations, code completion and code assists.
339339

340340
Commands:
341341
|:PymodeRopeAutoImport| -- Resolve import for element under cursor
@@ -397,8 +397,8 @@ Regenerate project cache on every save (if file has been modified)
397397
4.1 Completion ~
398398
*pymode-completion*
399399

400-
By default you can use <Ctrl-Space> for autocompletion. Will be
401-
automatically selected first entry and you can press <Return> to insert in
400+
By default you can use <Ctrl-Space> for autocompletion. The first entry will
401+
be automatically selected and you can press <Return> to insert the entry in
402402
your code. <C-X><C-O> and <C-P>/<C-N> works too.
403403

404404
Autocompletion is also called by typing a period in |Insert| mode by default.
@@ -552,8 +552,9 @@ Turn on pymode syntax *'g:pymode_syntax'*
552552
>
553553
let g:pymode_syntax = 1
554554
555-
More slow synchronizing. Disable on the slow machine, but code in docstrings
556-
could be broken. *'g:pymode_syntax_slow_sync'*
555+
Slower syntax synchronization that is better at handling code blocks in
556+
docstrings. Consider disabling this on slower hardware.
557+
*'g:pymode_syntax_slow_sync'*
557558
>
558559
let g:pymode_syntax_slow_sync = 1
559560

plugin/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" vi: fdl=1
2-
let g:pymode_version = "0.7.7b"
2+
let g:pymode_version = "0.7.8b"
33

44
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
55
com! PymodeTroubleshooting call pymode#troubleshooting#test()

pymode/environment.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ def var(self, name, to_bool=False):
7777
return value
7878

7979
def message(self, msg, history=False):
80-
""" Show message to user. """
80+
""" Show message to user.
81+
82+
:return: :None
83+
84+
"""
8185

8286
if history:
8387
return vim.command('echom "%s"' % str(msg))
@@ -188,14 +192,16 @@ def let(self, name, value):
188192
self.debug(cmd)
189193
vim.command(cmd)
190194

191-
def prepare_value(self, value):
195+
def prepare_value(self, value, dumps=True):
192196
""" Decode bstr to vim encoding.
193197
194198
:return unicode string:
195199
196200
"""
197201

198-
value = json.dumps(value)
202+
if dumps:
203+
value = json.dumps(value)
204+
199205
if PY2:
200206
value = value.decode('utf-8').encode(self.options.get('encoding'))
201207

pymode/rope.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def complete(dot=False):
8585
s_offset = codeassist.starting_offset(source, offset)
8686
p_prefix = prefix[offset - s_offset:]
8787
line = env.lines[row - 1]
88-
env.curbuf[row - 1] = line[:col] + p_prefix + line[col:] # noqa
88+
cline = line[:col] + p_prefix + line[col:]
89+
if cline != line:
90+
env.curbuf[row - 1] = env.prepare_value(cline, dumps=False)
8991
env.current.window.cursor = (row, col + len(p_prefix))
9092
env.run('complete', col - len(prefix) + len(p_prefix) + 1, proposals)
9193
return True
@@ -887,7 +889,8 @@ def _insert_import(name, module, ctx):
887889
source, _ = env.get_offset_params()
888890
lineno = ctx.importer.find_insertion_line(source)
889891
line = 'from %s import %s' % (module, name)
890-
env.curbuf[lineno - 1:lineno - 1] = [line]
892+
env.curbuf[lineno - 1:lineno - 1] = [
893+
env.prepare_value(line, dumps=False)]
891894
return True
892895

893896
pyobject = ctx.project.pycore.resource_to_pyobject(ctx.resource)

pymode/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def run_code():
1414
""" Run python code in current buffer. """
1515

16-
errors = []
16+
errors, err = [], ''
1717
line1, line2 = env.var('a:line1'), env.var('a:line2')
1818
lines = __prepare_lines(line1, line2)
1919

t/rope.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ describe 'pymode-plugin'
1717
end
1818

1919
it 'pymode rope auto open project in current working directory'
20+
21+
if $TRAVIS != ""
22+
SKIP 'Travis fails on this test'
23+
endif
24+
2025
let project_path = getcwd() . '/.ropeproject'
2126
Expect isdirectory(project_path) == 0
2227
normal oimporX

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy