Skip to content

Commit

Permalink
Update README.md due to bug fix. Refine a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace-Who committed Apr 12, 2017
1 parent edd1cce commit ad5a8e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ When enabled,
operation, so it doesn't affect them.
- `=` key acts like its default behavior except that it centers lines instead of
indenting them.

## Known bugs

A redo reaching the latest change is taken as a new change, causing the autocmd
centering current line.
5 changes: 3 additions & 2 deletions autoload/AutoCenter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ function! s:center() "{{{
center
" Put cursor back on the same char it is on before centering.
call cursor('.', l:curpos + indent('.'))
" A change in Insert mode or Replace mode is in progress.
" Only update the max change number when a change is done.
" An ongoing change in Insert mode or Replace mode is not taken as a new
" change if updating the 'b:AutoCenter_MaxChangeNr' during this time. To avoid
" this, wait until it is done.
if mode() !~ '^[iR]'
call s:upMaxChangeNr()
endif
Expand Down

0 comments on commit ad5a8e0

Please sign in to comment.