aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Driessen <vincent@3rdcloud.com>2013-08-14 02:45:12 -0700
committerVincent Driessen <vincent@3rdcloud.com>2013-08-14 02:45:12 -0700
commite86ed5d075e8c63f2369f50d4e0f57ee52573871 (patch)
tree3755db0517b88cd290ed9e798fd50a0fdaafde33
parent72bb0d5b872b8963860a47dd06c4e654270e9589 (diff)
parentc0d8d5fe05b095fd63231dbe808a11ed764fd8a6 (diff)
downloadvim-rst-tables-e86ed5d075e8c63f2369f50d4e0f57ee52573871.tar.gz
vim-rst-tables-e86ed5d075e8c63f2369f50d4e0f57ee52573871.tar.bz2
vim-rst-tables-e86ed5d075e8c63f2369f50d4e0f57ee52573871.zip
Merge pull request #18 from kri5/master
Add check to be able to create a top page table
-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