Skip to content

Commit bf9bbe5

Browse files
committed
Merge branch 'develop' of https://github.com/klen/python-mode into develop
2 parents 7d368f3 + 7ab4073 commit bf9bbe5

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

autoload/pymode.vim

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ endfunction "}}}
1212
" DESC: Import python libs
1313
fun! pymode#init(plugin_root, paths) "{{{
1414

15-
if g:pymode_python == 'disable'
16-
if g:pymode_warning
17-
call pymode#error("Pymode requires vim compiled with +python. Most of features will be disabled.")
18-
endif
19-
return
20-
endif
21-
2215
PymodePython import sys, vim
2316
PymodePython sys.path.insert(0, vim.eval('a:plugin_root'))
2417
PymodePython sys.path = vim.eval('a:paths') + sys.path

autoload/pymode/lint.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ fun! pymode#lint#check() "{{{
6565

6666
call g:PymodeSigns.refresh(loclist)
6767

68-
if g:pymode_lint_cwindow
69-
call loclist.show()
70-
endif
68+
call loclist.show()
7169

7270
call pymode#lint#show_errormessage()
7371
call pymode#wide_message('Found errors and warnings: ' . len(loclist._loclist))

autoload/pymode/run.vim

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ let s:efm .= '%-G%.%#'
4343

4444
PymodePython from pymode.run import run_code
4545

46-
call pymode#tools#loclist#init()
47-
4846

4947
" DESC: Run python code
5048
fun! pymode#run#code_run(line1, line2) "{{{
@@ -88,10 +86,7 @@ fun! pymode#run#code_run(line1, line2) "{{{
8886
call setqflist(qflist)
8987
endif
9088

91-
let loclist = g:PymodeLocList.current()
92-
let loclist._loclist = getqflist()
93-
let loclist._title = "Run errors"
94-
call loclist.show()
89+
call pymode#quickfix_open(0, g:pymode_quickfix_maxheight, g:pymode_quickfix_maxheight, 0)
9590

9691
let &efm = l:_efm
9792

autoload/pymode/tools/loclist.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fun! g:PymodeLocList.show() "{{{
6868
call setloclist(0, self._loclist)
6969
if self.is_empty()
7070
lclose
71-
else
71+
elseif g:pymode_lint_cwindow
7272
let num = winnr()
7373
lopen
7474
setl nowrap

ftplugin/python/pymode.vim

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@ if !g:pymode || pymode#default('b:pymode', 1)
22
finish
33
endif
44

5+
if g:pymode_python == 'disable'
6+
7+
if g:pymode_warning
8+
call pymode#error("Pymode requires vim compiled with +python. Most of features will be disabled.")
9+
endif
10+
11+
finish
12+
13+
else
14+
15+
516
let b:pymode_modified = &modified
617

718
" Init paths
819
if !pymode#default('g:pymode_init', 1)
9-
call pymode#init(expand('<sfile>:p:h:h:h'), g:pymode_paths)
10-
call pymode#virtualenv#init()
11-
call pymode#breakpoint#init()
12-
PymodePython from pymode.utils import patch_paths
13-
PymodePython patch_paths()
20+
21+
call pymode#init(expand('<sfile>:p:h:h:h'), g:pymode_paths)
22+
call pymode#virtualenv#init()
23+
call pymode#breakpoint#init()
24+
25+
PymodePython from pymode.utils import patch_paths
26+
PymodePython patch_paths()
27+
28+
endif
29+
1430
endif
1531

1632
command! -buffer -nargs=1 PymodeVirtualenv call pymode#virtualenv#activate(<args>)

0 commit comments

Comments
 (0)