Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6acddb2

Browse filesBrowse files
committed
Merge branch 'release/0.7.3b'
2 parents d295a98 + 79e160e commit 6acddb2
Copy full SHA for 6acddb2

File tree

Expand file treeCollapse file tree

10 files changed

+54
-23
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

10 files changed

+54
-23
lines changed
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ tags
1313
test.py
1414
todo.txt
1515
vendor
16+
vim.py
Collapse file

‎Changelog.rst‎

Copy file name to clipboardExpand all lines: Changelog.rst
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
## 2013-12-02 0.7.2b
4+
## 2013-12-02 0.7.3b
55
--------------------
66
* Update indentation support;
77
* Python3 support;
@@ -35,7 +35,7 @@ Changelog
3535
* Options added:
3636
'pymode_rope_regenerate_on_write', 'pymode_rope_completion',
3737
'pymode_rope_complete_on_dot', 'pymode_lint_sort',
38-
'pymode_rope_look_project', 'pymode_lint_unmodified'
38+
'pymode_rope_lookup_project', 'pymode_lint_unmodified'
3939

4040
* Commands added:
4141
'PymodeVirtualenv'
Collapse file

‎autoload/pymode.vim‎

Copy file name to clipboardExpand all lines: autoload/pymode.vim
+12-7Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ fun! pymode#quickfix_open(onlyRecognized, maxHeight, minHeight, jumpError) "{{{
4747
let numErrors = len(filter(getqflist(), 'v:val.valid'))
4848
let numOthers = len(getqflist()) - numErrors
4949
if numErrors > 0 || (!a:onlyRecognized && numOthers > 0)
50+
let num = winnr()
5051
botright copen
5152
exe max([min([line("$"), a:maxHeight]), a:minHeight]) . "wincmd _"
5253
if a:jumpError
5354
cc
54-
else
55+
elseif num != winnr()
5556
wincmd p
5657
endif
5758
else
@@ -109,13 +110,17 @@ fun! pymode#buffer_pre_write() "{{{
109110
endfunction
110111

111112
fun! pymode#buffer_post_write() "{{{
112-
if b:pymode_modified && g:pymode_rope_regenerate_on_write
113-
call pymode#debug('regenerate')
114-
call pymode#rope#regenerate()
113+
if g:pymode_rope
114+
if b:pymode_modified && g:pymode_rope_regenerate_on_write
115+
call pymode#debug('regenerate')
116+
call pymode#rope#regenerate()
117+
endif
115118
endif
116-
if g:pymode_lint_unmodified || (g:pymode_lint_on_write && b:pymode_modified)
117-
call pymode#debug('check code')
118-
call pymode#lint#check()
119+
if g:pymode_lint
120+
if g:pymode_lint_unmodified || (g:pymode_lint_on_write && b:pymode_modified)
121+
call pymode#debug('check code')
122+
call pymode#lint#check()
123+
endif
119124
endif
120125
endfunction "}}}
121126

Collapse file

‎autoload/pymode/lint.vim‎

Copy file name to clipboardExpand all lines: autoload/pymode/lint.vim
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ fun! pymode#lint#check() "{{{
6565
call g:PymodeSigns.refresh(loclist)
6666

6767
if g:pymode_lint_cwindow
68-
call setqflist(loclist._loclist)
69-
call pymode#quickfix_open(0, g:pymode_quickfix_maxheight, g:pymode_quickfix_minheight, 0)
68+
call loclist.show()
7069
endif
7170

7271
call pymode#lint#show_errormessage()
Collapse file

‎autoload/pymode/rope.vim‎

Copy file name to clipboardExpand all lines: autoload/pymode/rope.vim
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"
33
PymodePython from pymode import rope
44

5+
call pymode#tools#loclist#init()
6+
57

68
fun! pymode#rope#completions(findstart, base)
79
PymodePython rope.completions()
@@ -56,8 +58,10 @@ fun! pymode#rope#find_it()
5658
PymodePython rope.find_it()
5759
call pymode#wide_message('')
5860
if !empty(l:output)
59-
call setqflist(l:output)
60-
call pymode#quickfix_open(0, g:pymode_quickfix_maxheight, g:pymode_quickfix_minheight, 0)
61+
let loclist = g:PymodeLocList.current()
62+
let loclist._loclist = l:output
63+
let loclist._title = "Occurrences"
64+
call loclist.show()
6165
end
6266
endfunction
6367

Collapse file

‎autoload/pymode/run.vim‎

Copy file name to clipboardExpand all lines: autoload/pymode/run.vim
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ let s:efm .= '%-G%.%#'
4343

4444
PymodePython from pymode.run import run_code
4545

46+
call pymode#tools#loclist#init()
47+
4648

4749
" DESC: Run python code
4850
fun! pymode#run#code_run(line1, line2) "{{{
@@ -86,7 +88,11 @@ fun! pymode#run#code_run(line1, line2) "{{{
8688
call setqflist(qflist)
8789
endif
8890

89-
call pymode#quickfix_open(0, g:pymode_quickfix_maxheight, g:pymode_quickfix_maxheight, 0)
91+
let loclist = g:PymodeLocList.current()
92+
let loclist._loclist = getqflist()
93+
let loclist._title = "Run errors"
94+
call loclist.show()
95+
9096
let &efm = l:_efm
9197

9298
catch /E234/
Collapse file

‎autoload/pymode/tools/loclist.vim‎

Copy file name to clipboardExpand all lines: autoload/pymode/tools/loclist.vim
+18-2Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ fun! g:PymodeLocList.init(raw_list) "{{{
1010
let obj = copy(self)
1111
let loc_list = filter(copy(a:raw_list), 'v:val["valid"] == 1')
1212
call obj.clear()
13+
let obj._title = 'CodeCheck'
1314
return obj
1415
endfunction "}}}
1516

@@ -18,7 +19,6 @@ fun! g:PymodeLocList.current() "{{{
1819
if !exists("b:pymode_loclist")
1920
let b:pymode_loclist = g:PymodeLocList.init([])
2021
endif
21-
let b:pymode_loclist._bufnr = bufnr('.')
2222
return b:pymode_loclist
2323
endfunction "}}}
2424

@@ -31,7 +31,7 @@ endfunction "}}}
3131
fun! g:PymodeLocList.clear() "{{{
3232
let self._loclist = []
3333
let self._messages = {}
34-
let self._bufnr = bufnr('')
34+
let self._name = expand('%:t')
3535
endfunction "}}}
3636

3737

@@ -62,3 +62,19 @@ fun! g:PymodeLocList.filter(filters) "{{{
6262
endfor
6363
return loclist
6464
endfunction "}}}
65+
66+
67+
fun! g:PymodeLocList.show() "{{{
68+
call setloclist(0, self._loclist)
69+
if self.is_empty()
70+
lclose
71+
else
72+
let num = winnr()
73+
execute "lopen " . g:pymode_quickfix_maxheight
74+
execute max([min([line("$"), g:pymode_quickfix_maxheight]), g:pymode_quickfix_minheight]) . "wincmd _"
75+
if num != winnr()
76+
call setwinvar(winnr(), 'quickfix_title', self._title . ' <' . self._name . '>')
77+
wincmd p
78+
endif
79+
end
80+
endfunction "}}}
Collapse file

‎doc/pymode.txt‎

Copy file name to clipboardExpand all lines: doc/pymode.txt
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(__) (__) (__) (_) (_)(_____)(_)\_) (_/\/\_)(_____)(____/(____) ~
77

88

9-
Version: 0.7.2b
9+
Version: 0.7.3b
1010

1111
==============================================================================
1212
CONTENTS *pymode-contents*
@@ -377,9 +377,9 @@ rope finds ``.ropeproject`` in a parent dir, it sets the project for all child
377377
dirs and the scan may be slow for so many dirs and files.
378378

379379
Enable search |.ropeproject| in parent's directories
380-
*'g:pymode_rope_look_project'*
380+
*'g:pymode_rope_lookup_project'*
381381
>
382-
let g:pymode_rope_look_project = 1
382+
let g:pymode_rope_lookup_project = 1
383383
384384
385385
Show documentation for element under cursor ~
@@ -641,7 +641,7 @@ Solutions:
641641
in the current dir.
642642
- Run ``:PymodeRopeNewProject`` to make rope create ``.ropeproject`` in the
643643
current dir.
644-
- Set |'g:pymode_rope_look_project'| to 0 for prevent searching in parent
644+
- Set |'g:pymode_rope_lookup_project'| to 0 for prevent searching in parent
645645
dirs.
646646

647647

Collapse file

‎plugin/pymode.vim‎

Copy file name to clipboardExpand all lines: plugin/pymode.vim
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" vi: fdl=1
2-
let g:pymode_version = "0.7.2b"
2+
let g:pymode_version = "0.7.3b"
33

44
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
55
com! PymodeTroubleshooting call pymode#troubleshooting#test()
@@ -148,7 +148,7 @@ call pymode#default('g:pymode_breakpoint_cmd', '')
148148
call pymode#default('g:pymode_rope', 1)
149149

150150
" If project hasnt been finded in current working directory, look at parents directory
151-
call pymode#default('g:pymode_rope_look_project', 1)
151+
call pymode#default('g:pymode_rope_lookup_project', 1)
152152

153153
" Enable Rope completion
154154
call pymode#default('g:pymode_rope_completion', 1)
Collapse file

‎pymode/rope.py‎

Copy file name to clipboardExpand all lines: pymode/rope.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def get_ctx(*args, **kwargs):
308308
return resources.get(path)
309309

310310
project_path = os.path.dirname(vim.eval('getcwd()'))
311-
if int(vim.eval('g:pymode_rope_look_project')):
311+
if int(vim.eval('g:pymode_rope_lookup_project')):
312312
project_path = look_ropeproject(project_path)
313313

314314
ctx = projects.get(project_path)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.