diff options
author | Vincent Driessen <vincent@datafox.nl> | 2010-08-19 00:01:50 +0200 |
---|---|---|
committer | Vincent Driessen <vincent@datafox.nl> | 2010-08-19 00:05:27 +0200 |
commit | 9147256a8a85379c9a0586693f8f64da630126e5 (patch) | |
tree | 5d3bc01e01134199e149c53d2fa8f488cb5f2eb5 /src | |
parent | 487a1e11f1cb340917bc155adc7fe13a67648b84 (diff) | |
download | vim-rst-tables-9147256a8a85379c9a0586693f8f64da630126e5.tar.gz vim-rst-tables-9147256a8a85379c9a0586693f8f64da630126e5.tar.bz2 vim-rst-tables-9147256a8a85379c9a0586693f8f64da630126e5.zip |
Fix: vim.buffer -> vim.current.buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/rst_tables.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rst_tables.py b/src/rst_tables.py index 7a0bf99..0a93ea9 100644 --- a/src/rst_tables.py +++ b/src/rst_tables.py @@ -8,7 +8,7 @@ def get_table_bounds(): row, col = vim.current.window.cursor upper = lower = row try: - while vim.buffer[upper - 1].strip(): + while vim.current.buffer[upper - 1].strip(): upper -= 1 except IndexError: pass @@ -16,7 +16,7 @@ def get_table_bounds(): upper += 1 try: - while vim.buffer[lower - 1].strip(): + while vim.current.buffer[lower - 1].strip(): lower += 1 except IndexError: pass @@ -121,7 +121,7 @@ def draw_table(table): def create_table(): upper, lower = get_table_bounds() - slice = vim.buffer[upper - 1:lower] + slice = vim.current.buffer[upper - 1:lower] slice = """\ +==========+================================================================================================+ | Column 1 | Column 2 | @@ -136,4 +136,4 @@ def create_table(): #table = parse_table(slice) #slice = draw_table(table) - vim.buffer[upper - 1:lower] = slice + vim.current.buffer[upper - 1:lower] = slice |