:NR! causes original buffer modified
agguser opened this issue · 4 comments
agguser commented
Using :NR!
(open narrow buffer in current window) will always set original buffer to be modified
.
chrisbra commented
Hi,
is this a problem?
I think this was done, to not accidentally close Vim when doing :q! in the scratch buffer.
chrisbra commented
" if hidden is set, set the original buffer to be modified, so
" that :q won't accidently quit vim
if &hid
setl modified
endif
I don't want to change this.
agguser commented
But you can close narrow buffer with :bw
(or :bw!
) to not quit vim
?
Could you please add a configuration option (e.g. g:nrrw_no_set_modified
) to not setl modified
?
I want this because when original is set modified
, I don't know if it was modified from (accidentally) saving narrow buffer or not!
chrisbra commented
Okay I have found a different solution, by mapping away :q and :q!. Please test.