File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,7 @@ fun! pymode#breakpoint#Set(lnum) "{{{
8
8
normal k
9
9
endif
10
10
11
- " Disable lint
12
- let pymode_lint = g: pymode_lint
13
- let g: pymode_lint = 0
14
-
15
11
" Save file
16
- if &modifiable && &modified | write | endif
17
-
18
- let g: pymode_lint = pymode_lint
12
+ if &modifiable && &modified | noautocmd write | endif
19
13
20
14
endfunction " }}}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ fun! pymode#lint#Check() "{{{
5
5
6
6
if &modifiable && &modified
7
7
try
8
- write
8
+ noautocmd write
9
9
catch /E212/
10
10
echohl Error | echo " File modified and I can't save it. Cancel code checking." | echohl None
11
11
return 0
@@ -94,7 +94,7 @@ endfunction " }}}
94
94
fun ! pymode#lint#Auto () " {{{
95
95
if &modifiable && &modified
96
96
try
97
- write
97
+ noautocmd write
98
98
catch /E212/
99
99
echohl Error | echo " File modified and I can't save it. Cancel operation." | echohl None
100
100
return 0
Original file line number Diff line number Diff line change 2
2
fun ! pymode#run#Run (line1, line2) " {{{
3
3
if &modifiable && &modified
4
4
try
5
- write
5
+ noautocmd write
6
6
catch /E212/
7
7
echohl Error | echo " File modified and I can't save it. Cancel code checking." | echohl None
8
8
return 0
@@ -12,10 +12,12 @@ fun! pymode#run#Run(line1, line2) "{{{
12
12
py sys.stdout, stdout_ = StringIO.StringIO (), sys.stdout
13
13
py sys.stderr, stderr_ = StringIO.StringIO (), sys.stderr
14
14
py enc = vim .eval (' &enc' )
15
+ call setqflist ([])
15
16
call pymode#WideMessage (" Code running." )
16
17
try
17
- call setqflist ([])
18
- py execfile (vim .eval (' expand("%s:p")' ), {' raw_input' : lambda s: vim .eval (' input("{0}")' .format (s )), ' input' : lambda s: vim .eval (' input("{0}")' .format (s ))})
18
+ py context = globals ()
19
+ py context[' raw_input' ] = context[' input' ] = lambda s: vim .eval (' input("{0}")' .format (s ))
20
+ py execfile (vim .eval (' expand("%:p")' ), context)
19
21
py out, err = sys.stdout.getvalue ().strip (), sys.stderr.getvalue ()
20
22
py sys.stdout, sys.stderr = stdout_, stderr_
21
23
You can’t perform that action at this time.
0 commit comments