mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
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:
@@ -18,7 +18,7 @@ endfunction
|
||||
call s:SetGlobalOptDefault('table_mode_corner', '+')
|
||||
call s:SetGlobalOptDefault('table_mode_verbose', 1)
|
||||
call s:SetGlobalOptDefault('table_mode_separator', '|')
|
||||
call s:SetGlobalOptDefault('table_mode_escaped_separator_regex', '\(\\\)\@<!' . g:table_mode_separator)
|
||||
call s:SetGlobalOptDefault('table_mode_escaped_separator_regex', '\V\C\\\@1<!'.escape(g:table_mode_separator, '\'))
|
||||
call s:SetGlobalOptDefault('table_mode_fillchar', '-')
|
||||
call s:SetGlobalOptDefault('table_mode_header_fillchar', '-')
|
||||
call s:SetGlobalOptDefault('table_mode_map_prefix', '<Leader>t')
|
||||
|
||||
Reference in New Issue
Block a user