diff --git a/7.1.313 b/7.1.313
new file mode 100644
index 0000000..add47d9
--- /dev/null
+++ b/7.1.313
@@ -0,0 +1,116 @@
+To: vim-dev@vim.org
+Subject: Patch 7.1.313
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.313
+Problem:    When the netbeans interface setModified call is used the status
+	    lines and window title are not updated.
+Solution:   Redraw the status lines and title. (Philippe Fremy)
+Files:	    src/netbeans.c
+
+
+*** ../vim-7.1.312/src/netbeans.c	Sun Mar 16 16:02:47 2008
+--- src/netbeans.c	Wed May 28 15:12:13 2008
+***************
+*** 16,21 ****
+--- 16,25 ----
+   * 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,1986 ****
+  	}
+  	else if (streq((char *)cmd, "setModified"))
+  	{
+  	    if (buf == NULL || buf->bufp == NULL)
+  	    {
+  /*		EMSG("E646: null bufp in setModified"); */
+  		return FAIL;
+  	    }
+  	    if (streq((char *)args, "T"))
+! 		buf->bufp->b_changed = 1;
+  	    else
+  	    {
+  		struct stat	st;
+--- 1978,1993 ----
+  	}
+  	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 = TRUE;
+  	    else
+  	    {
+  		struct stat	st;
+***************
+*** 1990,1998 ****
+  		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->modified = buf->bufp->b_changed;
+  /* =====================================================================*/
+  	}
+  	else if (streq((char *)cmd, "setModtime"))
+--- 1997,2016 ----
+  		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 = 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"))
+*** ../vim-7.1.312/src/version.c	Mon Jun  9 14:45:17 2008
+--- src/version.c	Mon Jun  9 15:08:40 2008
+***************
+*** 668,669 ****
+--- 673,676 ----
+  {   /* Add new patch number below this line */
++ /**/
++     313,
+  /**/
+
+-- 
+Q: What is the difference betwee open-source and commercial software?
+A: If you have a problem with commercial software you can call a phone
+   number and they will tell you it might be solved in a future version.
+   For open-source software there isn't a phone number to call, but you
+   get the solution within a day.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///