Fix the column modifications on escaped separators

If a g:table_mode_separator is escaped by a backslash, the table is
aligned ignoring this instance of the g:table_mode_separator, but the
column deletion and insertion functions did not consider this behaviour.

The g:table_mode_escaped_separator regex is simplified and optimized a
little bit. Also more care is taken to prevent unexpected behaviour if
special characters are used as g:table_mode_separator.
This commit is contained in:
ibbem
2020-04-03 23:41:56 +02:00
parent 67129cd1e0
commit 85a5e3d4e1
6 changed files with 60 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
let g:table_mode_corner = '+'
let g:table_mode_separator = '|'
let g:table_mode_escaped_separator_regex = '\(\\\)\@<!|'
let g:table_mode_escaped_separator_regex = '\V\C\\\@1<!|'
let g:table_mode_fillchar = '-'
let g:table_mode_header_fillchar = '-'
let g:table_mode_map_prefix = '<Leader>t'