]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.523 v7.3.523
authorBram Moolenaar <Bram@vim.org>
Fri, 18 May 2012 16:47:17 +0000 (18:47 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 18 May 2012 16:47:17 +0000 (18:47 +0200)
Problem:    ":diffupdate" doesn't check for files changed elsewhere.
Solution:   Add the ! flag. (Christian Brabandt)

runtime/doc/diff.txt
src/diff.c
src/ex_cmds.h
src/version.c

index 288ddd78a8e663f643ae7ba7e0d8c632d7a4dd10..bf40afa88749f7732e9ecf649ff94d7323e95fdb 100644 (file)
@@ -178,7 +178,7 @@ buffer.  If you don't want a buffer to remain used for the diff do ":set
 nodiff" before hiding it.
 
                                                        *:diffu* *:diffupdate*
-:diffu[pdate]                  Update the diff highlighting and folds.
+:diffu[pdate][!]               Update the diff highlighting and folds.
 
 Vim attempts to keep the differences updated when you make changes to the
 text.  This mostly takes care of inserted and deleted lines.  Changes within a
@@ -187,6 +187,9 @@ To force the differences to be updated use: >
 
        :diffupdate
 
+If the ! is included Vim will check if the file was changed externally and
+needs to be reloaded.  It will prompt for each changed file, like `:checktime`
+was used.
 
 Vim will show filler lines for lines that are missing in one window but are
 present in another.  These lines were inserted in another file or deleted in
index 5844ec9233d35fdcecc7589aa91bfb2cd93571e4..d9aaec828726d7899006b862b4f4e3bf898b3d52 100644 (file)
@@ -783,6 +783,15 @@ ex_diffupdate(eap)
        goto theend;
     }
 
+    /* :diffupdate! */
+    if (eap != NULL && eap->forceit)
+       for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new)
+       {
+           buf = curtab->tp_diffbuf[idx_new];
+           if (buf_valid(buf))
+               buf_check_timestamp(buf, FALSE);
+       }
+
     /* Write the first buffer to a tempfile. */
     buf = curtab->tp_diffbuf[idx_orig];
     if (diff_write(buf, tmp_orig) == FAIL)
index 16540bda09c1d74d3bb0ca59608593f9990f8b67..ac61f1a0ab9e9fd6f2371286716b21529ec6fbc7 100644 (file)
@@ -304,7 +304,7 @@ EX(CMD_delfunction, "delfunction",  ex_delfunction,
 EX(CMD_display,                "display",      ex_display,
                        EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN),
 EX(CMD_diffupdate,     "diffupdate",   ex_diffupdate,
-                       TRLBAR),
+                       BANG|TRLBAR),
 EX(CMD_diffget,                "diffget",      ex_diffgetput,
                        RANGE|EXTRA|TRLBAR|MODIFY),
 EX(CMD_diffoff,                "diffoff",      ex_diffoff,
index 0c866c5ec56a2c916b22a848121895e1bb733788..82672b1d1809c15cf72bc362404938f57f0788e2 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    523
 /**/
     522,
 /**/