aboutsummaryrefslogtreecommitdiffstats
path: root/src/rst_tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/rst_tables.py')
-rw-r--r--src/rst_tables.py8
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