This formatting is needed in the optimized table formatting algorithm
for shrinking the current table line to try the best to avoid
re-formatting the whole table. However, this breaks cursor motion and
may also affect other table related behaviors. The fix is to move this
formatting to get_aligned_rows(). Now table rows are not affected by any
means, because the current row is only replaced temporarily for the
formatting purpose only and gets reverted as soon as the check is
finished.
Fixes#656.
- get_cells() FSM correctly treats unclosed quotes now,
- fixed gqq command: now it aligns all the table
- proposed 'fast' variant of gqq: gq1 that aligns current + 2 above rows
1. s:get_aligned_rows(): getting 2 last rows is enough for having been
formatted tables
2. vimwiki#tbl#get_cells(): using faster strpart() instead concatenating
every new character into variables cell and quote
3. checking by getline() whether the line was changed before setline()
does matter on slower computers