Mercurial > vim
diff src/fileio.c @ 164:8b0ee9d57d7f
updated for version 7.0050
author | vimboss |
---|---|
date | Sat, 12 Feb 2005 14:29:27 +0000 |
parents | 6df0106fc595 |
children | c93c9cad9618 |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -433,7 +433,7 @@ readfile(fname, sfname, from, lines_to_s * Only set/reset b_p_ro when BF_CHECK_RO is set. */ check_readonly = (newfile && (curbuf->b_flags & BF_CHECK_RO)); - if (check_readonly && !readonlymode) /* default: set file not readonly */ + if (check_readonly && !readonlymode) curbuf->b_p_ro = FALSE; if (newfile && !read_stdin && !read_buffer) @@ -3499,8 +3499,8 @@ buf_write(buf, fname, sfname, start, end #endif /* When using ":w!" and writing to the current file, readonly makes no - * sense, reset it */ - if (forceit && overwriting) + * sense, reset it, unless 'Z' appears in 'cpoptions'. */ + if (forceit && overwriting && vim_strchr(p_cpo, CPO_KEEPRO) == NULL) { buf->b_p_ro = FALSE; #ifdef FEAT_TITLE