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) "{{{
88 normal k
99 endif
1010
11- " Disable lint
12- let pymode_lint = g: pymode_lint
13- let g: pymode_lint = 0
14-
1511 " Save file
16- if &modifiable && &modified | write | endif
17-
18- let g: pymode_lint = pymode_lint
12+ if &modifiable && &modified | noautocmd write | endif
1913
2014endfunction " }}}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ fun! pymode#lint#Check() "{{{
55
66 if &modifiable && &modified
77 try
8- write
8+ noautocmd write
99 catch /E212/
1010 echohl Error | echo " File modified and I can't save it. Cancel code checking." | echohl None
1111 return 0
@@ -94,7 +94,7 @@ endfunction " }}}
9494fun ! pymode#lint#Auto () " {{{
9595 if &modifiable && &modified
9696 try
97- write
97+ noautocmd write
9898 catch /E212/
9999 echohl Error | echo " File modified and I can't save it. Cancel operation." | echohl None
100100 return 0
Original file line number Diff line number Diff line change 22fun ! pymode#run#Run (line1, line2) " {{{
33 if &modifiable && &modified
44 try
5- write
5+ noautocmd write
66 catch /E212/
77 echohl Error | echo " File modified and I can't save it. Cancel code checking." | echohl None
88 return 0
@@ -12,10 +12,12 @@ fun! pymode#run#Run(line1, line2) "{{{
1212 py sys.stdout, stdout_ = StringIO.StringIO (), sys.stdout
1313 py sys.stderr, stderr_ = StringIO.StringIO (), sys.stderr
1414 py enc = vim .eval (' &enc' )
15+ call setqflist ([])
1516 call pymode#WideMessage (" Code running." )
1617 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)
1921 py out, err = sys.stdout.getvalue ().strip (), sys.stderr.getvalue ()
2022 py sys.stdout, sys.stderr = stdout_, stderr_
2123
You can’t perform that action at this time.
0 commit comments