aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ftplugin/rst_tables.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftplugin/rst_tables.vim b/ftplugin/rst_tables.vim
index f17eba2..4b4ebb7 100644
--- a/ftplugin/rst_tables.vim
+++ b/ftplugin/rst_tables.vim
@@ -28,7 +28,7 @@ def get_table_bounds():
row, col = vim.current.window.cursor
upper = lower = row
try:
- while vim.current.buffer[upper - 1].strip():
+ while vim.current.buffer[upper - 1].strip() and upper > 0:
upper -= 1
except IndexError:
pass