]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-006 v7.1.006
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2007 13:36:52 +0000 (13:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2007 13:36:52 +0000 (13:36 +0000)
src/buffer.c
src/version.c

index 14b64c8eea10ae99360535e087b342a2a9b67d8b..8bd3a3553334d8ce8d64f64ff7ae5cf3a16eccb5 100644 (file)
@@ -171,6 +171,13 @@ open_buffer(read_stdin, eap)
            /* Put the cursor on the first line. */
            curwin->w_cursor.lnum = 1;
            curwin->w_cursor.col = 0;
+
+           /* Set or reset 'modified' before executing autocommands, so that
+            * it can be changed there. */
+           if (!readonlymode && !bufempty())
+               changed();
+           else if (retval != FAIL)
+               unchanged(curbuf, FALSE);
 #ifdef FEAT_AUTOCMD
 # ifdef FEAT_EVAL
            apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
@@ -194,16 +201,16 @@ open_buffer(read_stdin, eap)
     /* When reading stdin, the buffer contents always needs writing, so set
      * the changed flag.  Unless in readonly mode: "ls | gview -".
      * When interrupted and 'cpoptions' contains 'i' set changed flag. */
-    if ((read_stdin && !readonlymode && !bufempty())
+    if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL)
 #ifdef FEAT_AUTOCMD
                || modified_was_set     /* ":set modified" used in autocmd */
 # ifdef FEAT_EVAL
                || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL)
 # endif
 #endif
-               || (got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL))
+       )
        changed();
-    else if (retval != FAIL)
+    else if (retval != FAIL && !read_stdin)
        unchanged(curbuf, FALSE);
     save_file_ff(curbuf);              /* keep this fileformat */
 
index 833845035ec0b27b02c8b39a598891cdb96aa5ac..88fa407a05794f21adafbf073cfc0fa0e76f2b56 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    6,
 /**/
     5,
 /**/