mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Fixed ConvertDelimiterToSeparator
- We now aggressively add separators to a line even if it does not have the g:table_mode_delimiter. If the user calls Tableize, we should trust the user he wishes to tableize everything. Earlier implementation skips & fails for lines in text that did not have the g:table_mode_delimiter and hence formed inconsistent tables. Everything can be undone with a single 'u' anyways.
This commit is contained in:
@@ -109,7 +109,7 @@ function! s:IsTableModeActive()
|
||||
endfunction
|
||||
|
||||
function! s:ConvertDelimiterToSeparator(line)
|
||||
if getline(a:line) =~# g:table_mode_delimiter
|
||||
if a:line
|
||||
execute 'silent! ' . a:line . 's/^\|' . g:table_mode_delimiter . '\|$/' . g:table_mode_separator . '/ge'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user