From 10ad19efc19e9f36ca9c7785b97c3de260c20e71 Mon Sep 17 00:00:00 2001 From: edyfox Date: Tue, 10 Jun 2008 05:46:41 +0000 Subject: [PATCH] Merged from the latest developing branch. git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@1043 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- src/netbeans.c | 22 ++++++++++++++++++++-- src/option.c | 5 +++-- src/po/check.vim | 19 +++++++++++++++++-- src/version.c | 6 ++++++ 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/netbeans.c b/src/netbeans.c index ed415a5c..a06690c4 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -16,6 +16,10 @@ * See ":help netbeans-protocol" for explanation. */ +#if defined(MSDOS) || defined(MSWIN) +# include "vimio.h" /* for mch_open(), must be before vim.h */ +#endif + #include "vim.h" #if defined(FEAT_NETBEANS_INTG) || defined(PROTO) @@ -1974,13 +1978,16 @@ nb_do_cmd( } else if (streq((char *)cmd, "setModified")) { + int prev_b_changed; + if (buf == NULL || buf->bufp == NULL) { /* EMSG("E646: null bufp in setModified"); */ return FAIL; } + prev_b_changed = buf->bufp->b_changed; if (streq((char *)args, "T")) - buf->bufp->b_changed = 1; + buf->bufp->b_changed = TRUE; else { struct stat st; @@ -1990,9 +1997,20 @@ nb_do_cmd( if (buf->bufp->b_ffname != NULL && mch_stat((char *)buf->bufp->b_ffname, &st) >= 0) buf_store_time(buf->bufp, &st, buf->bufp->b_ffname); - buf->bufp->b_changed = 0; + buf->bufp->b_changed = FALSE; } buf->modified = buf->bufp->b_changed; + if (prev_b_changed != buf->bufp->b_changed) + { +#ifdef FEAT_WINDOWS + check_status(buf->bufp); + redraw_tabline = TRUE; +#endif +#ifdef FEAT_TITLE + maketitle(); +#endif + update_screen(0); + } /* =====================================================================*/ } else if (streq((char *)cmd, "setModtime")) diff --git a/src/option.c b/src/option.c index c4328697..885c547b 100644 --- a/src/option.c +++ b/src/option.c @@ -243,7 +243,8 @@ /* WV_ and BV_ values get typecasted to this for the "indir" field */ typedef enum { - PV_NONE = 0 + PV_NONE = 0, + PV_MAXVAL = 0xffff /* to avoid warnings for value out of range */ } idopt_T; /* @@ -8713,7 +8714,7 @@ put_setstring(fd, cmd, name, valuep, expand) { s = *valuep; while (*s != NUL) - if (fputs((char *)str2special(&s, FALSE), fd) < 0) + if (put_escstr(fd, str2special(&s, FALSE), 2) == FAIL) return FAIL; } else if (expand) diff --git a/src/po/check.vim b/src/po/check.vim index 50ed9a40..abe999a4 100644 --- a/src/po/check.vim +++ b/src/po/check.vim @@ -1,7 +1,8 @@ " Vim script for checking .po files. " -" Go through the file and verify that all %...s items in "msgid" are identical -" to the ones in "msgstr". +" Go through the file and verify that: +" - All %...s items in "msgid" are identical to the ones in "msgstr". +" - An error or warning code in "msgid" matches the one in "msgstr". if 1 " Only execute this if the eval feature is available. @@ -56,6 +57,20 @@ while 1 endif endwhile +" Check that error code in msgid matches the one in msgstr. +" +" Examples of mismatches found with msgid "E123: ..." +" - msgstr "E321: ..." error code mismatch +" - msgstr "W123: ..." warning instead of error +" - msgstr "E123 ..." missing colon +" - msgstr "..." missing error code +" +1 +if search('msgid "\("\n"\)\?\([EW][0-9]\+:\).*\nmsgstr "\("\n"\)\?[^"]\@=\2\@!') > 0 + echo 'Mismatching error/warning code in line ' . line('.') + let error = 1 +endif + if error == 0 echo "OK" endif diff --git a/src/version.c b/src/version.c index 04581402..61a8944f 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,12 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 314, +/**/ + 313, +/**/ + 312, +/**/ 311, /**/ 310, -- 2.11.4.GIT