Skip to content

Commit

Permalink
plugin/magit.vim: clear undo history after each update_buffer() call …
Browse files Browse the repository at this point in the history
…(refs #64)

Then, user can't undo some changes in magit buffer made the backend (these changes would only be virtual).
But it can still undo some changes when he is typing.

Catch undo and make undo really undoing magit commands would be soooo cool, but seems quite difficult to implement.
  • Loading branch information
jreybert committed Feb 2, 2016
1 parent 9989573 commit f9c7e1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/magit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ function! magit#update_buffer()
call call(func.fn, func.arg)
endfor

call magit#utils#clear_undo()

call winrestview(l:winview)

if ( b:magit_current_commit_mode != '' )
Expand Down

0 comments on commit f9c7e1f

Please sign in to comment.