forked from Bogdanp/pyrepl.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix extra space after empty indented line bug.
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|