updated for version 7.0038
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 7bcdaf2..14f7580 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -905,6 +905,9 @@
 	    curbuf->b_op_end.lnum -= linecount;		/* adjust '] */
 	    write_lnum_adjust(-linecount);		/* adjust last line
 							   for next write */
+#ifdef FEAT_FOLDING
+	    foldUpdate(curwin, curbuf->b_op_start.lnum, curbuf->b_op_end.lnum);
+#endif
 	}
 	else
 	{
@@ -914,6 +917,7 @@
 	    curwin->w_cursor.lnum = curbuf->b_op_end.lnum;
 	    linecount = curbuf->b_op_end.lnum - curbuf->b_op_start.lnum + 1;
 	}
+
 	beginline(BL_WHITE | BL_FIX);	    /* cursor on first non-blank */
 	--no_wait_return;