Skip to content

Commit

Permalink
AutoAlign only if buffer is already modified. Fix #126
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvasagar committed Jan 22, 2018
1 parent b25fe6f commit bdd96b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/tablemode.vim
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function! s:ToggleAutoAlign() "{{{2
augroup TableModeAutoAlign
au!

autocmd CursorHold <buffer> nested silent! call tablemode#table#Realign('.')
autocmd CursorHold <buffer> nested silent! if &modified | call tablemode#table#Realign('.') | endif
autocmd CursorHoldI <buffer> nested silent! if &modified | call tablemode#table#Realign('.') | endif
augroup END
else
autocmd! TableModeAutoAlign CursorHold
Expand Down

0 comments on commit bdd96b0

Please sign in to comment.