Skip to content

Commit

Permalink
Fix extra space after empty indented line bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed May 27, 2011
1 parent 1b277a9 commit 3174b09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/pyrepl.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" =======================================================================
" File: pyrepl.vim
" Version: 0.1.7
" Version: 0.1.8
" Description: Vim plugin that provides a Python REPL inside a buffer.
" Maintainer: Bogdan Popa <[email protected]>
" License: Copyright (C) 2011 Bogdan Popa
Expand Down Expand Up @@ -100,7 +100,9 @@ class PyREPL(object):
except IndexError:
return ""
indent_level = self.count_char(previous_line, " ")
if previous_line[-1] == ":":
if previous_line == " " * indent_level:
return " " * (indent_level - 1)
elif previous_line[-1] == ":":
return "{0} ".format(" " * indent_level)
else:
return " " * indent_level
Expand Down

0 comments on commit 3174b09

Please sign in to comment.