Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2149076

Browse files
committed
Update code running
1 parente63911f commit2149076

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎autoload/pymode/run.vim

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,18 @@ context = dict(__name__='__main__', input=_input, raw_input=_input)
6060
out, errors="", []
6161
sys.stdout, stdout_= StringIO.StringIO(), sys.stdout
6262
sys.stderr, stderr_= StringIO.StringIO(), sys.stderr
63+
64+
lines= [l.rstrip()forlinvim.eval('l:code')]
65+
indent=0
66+
forlineinlines:
67+
ifline:
68+
indent=len(line)-len(line.lstrip())
69+
break
70+
71+
lines= [l[indent:]forlinlines]
72+
6373
try:
64-
code=compile('\n'.join(vim.eval('l:code'))+'\n',vim.current.buffer.name,'exec')
74+
code=compile('\n'.join(lines)+'\n',vim.current.buffer.name,'exec')
6575
exec(code, context)
6676

6777
except SystemExitase:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp