mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Merge pull request #134 from jeetsukumaran/master
Disable/restore foldmethod during realignment
This commit is contained in:
@@ -166,6 +166,9 @@ function! tablemode#table#AddBorder(line) "{{{2
|
||||
endfunction
|
||||
|
||||
function! tablemode#table#Realign(line) "{{{2
|
||||
let current_fm = &foldmethod " save foldmethod to be restored
|
||||
setlocal foldmethod=manual " manual foldmethod while table is being aligned
|
||||
|
||||
let line = tablemode#utils#line(a:line)
|
||||
|
||||
let lines = []
|
||||
@@ -200,4 +203,7 @@ function! tablemode#table#Realign(line) "{{{2
|
||||
for bline in blines
|
||||
call tablemode#table#AddBorder(bline)
|
||||
endfor
|
||||
|
||||
" restore foldmethod
|
||||
execute "setlocal foldmethod=" . current_fm
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user