[minor] refactor autocmd function: tweak restore behavior
[major] diff mode auto-resizing.