updated for version 7.0185
diff --git a/src/dosinst.c b/src/dosinst.c
index efc6fdf..41a8267 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -1194,24 +1194,25 @@
 	fprintf(fd, "  if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' | endif\n");
 	fprintf(fd, "  let arg3 = v:fname_out\n");
 	fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
-	p = strchr(installdir, ' ');
-	if (p != NULL)
-	{
-	    /* The path has a space.  When using cmd.exe (Win NT/2000/XP) put
-	     * quotes around the whole command and around the diff command.
-	     * Otherwise put a double quote just before the space and at the
-	     * end of the command.  Putting quotes around the whole thing
-	     * doesn't work on Win 95/98/ME.  This is mostly guessed! */
-	    fprintf(fd, "  if &sh =~ '\\<cmd'\n");
-	    fprintf(fd, "    silent execute '!\"\"%s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . '\"'\n", installdir);
-	    fprintf(fd, "  else\n");
-	    *p = NUL;
-	    fprintf(fd, "    silent execute '!%s\" %s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir, p + 1);
-	    *p = ' ';
-	    fprintf(fd, "  endif\n");
-	}
-	else
-	    fprintf(fd, "  silent execute '!%s\\diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir);
+
+	/* If the path has a space:  When using cmd.exe (Win NT/2000/XP) put
+	 * quotes around the whole command and around the diff command.
+	 * Otherwise put a double quote just before the space and at the
+	 * end of the command.  Putting quotes around the whole thing
+	 * doesn't work on Win 95/98/ME.  This is mostly guessed! */
+	fprintf(fd, "  let eq = ''\n");
+	fprintf(fd, "  if $VIMRUNTIME =~ ' '\n");
+	fprintf(fd, "    if &sh =~ '\\<cmd'\n");
+	fprintf(fd, "      let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
+	fprintf(fd, "      let eq = '\"'\n");
+	fprintf(fd, "    else\n");
+	fprintf(fd, "      let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
+	fprintf(fd, "    endif\n");
+	fprintf(fd, "  else\n");
+	fprintf(fd, "    let cmd = $VIMRUNTIME . '\\diff'\n");
+	fprintf(fd, "  endif\n");
+	fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
+
 	fprintf(fd, "endfunction\n");
 	fprintf(fd, "\n");
     }
diff --git a/src/globals.h b/src/globals.h
index b41c9e0..9fd9b66 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -398,6 +398,7 @@
 #ifdef FEAT_DIFF
 /* Value set from 'diffopt'. */
 EXTERN int	diff_context INIT(= 6);	/* context for folds */
+EXTERN int	diff_need_scrollbind INIT(= FALSE);
 #endif
 
 #ifdef FEAT_MENU
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 755f943..bb26497 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -28,7 +28,9 @@
     char_u	*text;
     static char_u  *result = NULL;
     long	winnr = 0;
+#ifdef FEAT_WINDOWS
     win_T	*cw;
+#endif
 
 
     /* Don't do anything when 'ballooneval' is off, messages scrolled the
@@ -40,9 +42,11 @@
     if (*p_bexpr != NUL
 	    && get_beval_info(balloonEval, TRUE, &wp, &lnum, &text, &col) == OK)
     {
+# ifdef FEAT_WINDOWS
 	/* Convert window pointer to number. */
 	for (cw = firstwin; cw != wp; cw = cw->w_next)
 	    ++winnr;
+# endif
 
 	set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum);
 	set_vim_var_nr(VV_BEVAL_WINNR, winnr);
@@ -293,7 +297,11 @@
     *textp = NULL;
     row = Y_2_ROW(beval->y);
     col = X_2_COL(beval->x);
+#ifdef FEAT_WINDOWS
     wp = mouse_find_win(&row, &col);
+#else
+    wp = firstwin;
+#endif
     if (wp != NULL && row < wp->w_height && col < W_WIDTH(wp))
     {
 	/* Found a window and the cursor is in the text.  Now find the line
diff --git a/src/main.c b/src/main.c
index fd85ea8..561d6ae 100644
--- a/src/main.c
+++ b/src/main.c
@@ -988,6 +988,15 @@
 	    skip_redraw = FALSE;
 	else if (do_redraw || stuff_empty())
 	{
+#if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND)
+	    /* Scroll-binding for diff mode may have been postponed until
+	     * here.  Avoids doing it for every change. */
+	    if (diff_need_scrollbind)
+	    {
+		check_scrollbind((linenr_T)0, 0L);
+		diff_need_scrollbind = FALSE;
+	    }
+#endif
 #if defined(FEAT_FOLDING) && defined(FEAT_VISUAL)
 	    /* Include a closed fold completely in the Visual area. */
 	    foldAdjustVisual();
@@ -1153,9 +1162,14 @@
 	    buf->b_changedtick = -1;	/* note that we did it already */
 	    wp = firstwin;		/* restart, window may be closed */
 	}
+# ifdef FEAT_WINDOWS
 	else
 	    wp = wp->w_next;
+# else
+	break;
+# endif
     }
+
     /* Trigger BufUnload for buffers that are loaded */
     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
 	if (buf->b_ml.ml_mfp != NULL)
diff --git a/src/po/cleanup.vim b/src/po/cleanup.vim
index 78d1e5a..a4905c2 100644
--- a/src/po/cleanup.vim
+++ b/src/po/cleanup.vim
@@ -3,6 +3,7 @@
 " - Comment-out fuzzy and empty messages.
 " - Make sure there is a space before the string (required for Solaris).
 " Requires Vim 6.0 or later (because of multi-line search patterns).
+diffoff!
 silent g/^#: /d
 silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
 silent g/^msgstr"/s//msgstr "/
diff --git a/src/syntax.c b/src/syntax.c
index 1c093a0..ab9bcce 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2974,8 +2974,11 @@
     else
     {
 	/* Don't go past the end of the line.  Matters for "rs=e+2" when there
-	 * is a matchgroup. */
-	len = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE));
+	 * is a matchgroup. Watch out for match with last NL in the buffer. */
+	if (result->lnum > syn_buf->b_ml.ml_line_count)
+	    len = 0;
+	else
+	    len = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE));
 	if (col > len)
 	    result->col = len;
 	else