Skip to content

Commit 91ffa66

Browse files
committed
Fix run
1 parent 9799213 commit 91ffa66

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

autoload/pymode/breakpoint.vim

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff 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

2014
endfunction "}}}

autoload/pymode/lint.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 " }}}
9494
fun! 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

autoload/pymode/run.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
fun! 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

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