diff --git a/plugin/makecols.vim b/plugin/makecols.vim index b1cf572..4602332 100644 --- a/plugin/makecols.vim +++ b/plugin/makecols.vim @@ -26,7 +26,7 @@ function! s:get_visual_selection() if (c == 0) let new_string = lines[i] else - if (i % no_of_cols) + if (c % no_of_cols) let new_string = join([new_string, lines[i]], "\t") else let new_string = join([new_string, lines[i]], "\n")