Skip to content

Commit 9da161d

Browse files
authored
Merge pull request #7 from bentilley/3-fix-function-without-trailing-empty-line
fix(vimenv): repair off by one error in lines_following_cursor
2 parents bb97436 + f28009d commit 9da161d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/vimenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def lines_following_cursor(self):
102102
cursor_row = vim.current.window.cursor[0] - 1
103103
current_row = cursor_row
104104
while True:
105-
if current_row >= len(vim.current.buffer) - 1:
105+
if current_row > len(vim.current.buffer) - 1:
106106
raise StopIteration('Buffer is out of lines.')
107107
yield current_row, buffer[current_row]
108108
current_row += 1

0 commit comments

Comments
 (0)