diff options
author | Christophe Courtaut <christophe.courtaut@gmail.com> | 2013-08-14 11:42:49 +0200 |
---|---|---|
committer | Christophe Courtaut <christophe.courtaut@gmail.com> | 2013-08-14 11:42:49 +0200 |
commit | c0d8d5fe05b095fd63231dbe808a11ed764fd8a6 (patch) | |
tree | 3755db0517b88cd290ed9e798fd50a0fdaafde33 | |
parent | 72bb0d5b872b8963860a47dd06c4e654270e9589 (diff) | |
download | vim-rst-tables-c0d8d5fe05b095fd63231dbe808a11ed764fd8a6.tar.gz vim-rst-tables-c0d8d5fe05b095fd63231dbe808a11ed764fd8a6.tar.bz2 vim-rst-tables-c0d8d5fe05b095fd63231dbe808a11ed764fd8a6.zip |
Add check to be able to create a top page table
This commit adds a check for top boundary, so if the table
goes up to the top of the document, it will be correctly detected.
-rw-r--r-- | ftplugin/rst_tables.vim | 2 |
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 |