Skip to content

Commit a2b752f

Browse files
committed
Fix code run
1 parent 412b5c5 commit a2b752f

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

Changelog.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ Changelog
99
* Added pymode modeline ':help PythonModeModeline'
1010
* Added diagnostic tool ':call pymode#troubleshooting#Test()'
1111
* Added `PyLintAuto` command ':help PyLintAuto'
12-
* Now Code checking is async operation
13-
* Improve speed of pymode folding
12+
* Code checking is async operation now
13+
* More, more fast the pymode folding
14+
* Repair python code run
1415

1516
## 2012-05-24 0.6.4
1617
-------------------

autoload/pymode.vim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,3 @@ endfunction "}}}
175175

176176

177177
" vim: fdm=marker:fdl=0
178-
179-
180-

autoload/pymode/run.vim

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ fun! pymode#run#Run(line1, line2) "{{{
33
if &modifiable && &modified | write | endif
44
py import StringIO
55
py sys.stdout, _ = StringIO.StringIO(), sys.stdout
6-
py execfile(vim.eval('expand("%s:p")'), {}, {})
7-
py sys.stdout, out = _, sys.stdout.getvalue()
8-
call pymode#TempBuffer()
9-
py vim.current.buffer.append(out.split('\n'), 0)
10-
wincmd p
6+
call pymode#WideMessage("Code running.")
7+
try
8+
py execfile(vim.eval('expand("%s:p")'))
9+
py sys.stdout, out = _, sys.stdout.getvalue()
10+
call pymode#TempBuffer()
11+
py vim.current.buffer.append(out.split('\n'), 0)
12+
wincmd p
13+
call pymode#WideMessage("")
14+
15+
catch /.*/
16+
17+
echohl Error | echo "Run-time error." | echohl none
18+
19+
endtry
1120
endfunction "}}}

0 commit comments

Comments
 (0)