When using BufWriteCmd, :undo command doesn't set 'modified' flag properly.

Steps to reproduce:

  $ vim -u NONE -N
  :edit sample
  :autocmd BufWriteCmd <buffer> setlocal nomodified
  :put ='1st'         " The 1st change of buffer.
  :write
  :put ='2nd'         " The 2nd change of buffer.
  :put ='3rd'         " The 3rd change of buffer.
  :write
  :set modified?      " => nomodified
  :undo
  :set modified?      " => modified
  :undo
  :set modified?      " => nomodified   (I expected "modified")

For instance, editing remote file with netrw has same problem.

-- 
Yukihiro Nakadaira - [email protected]

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui