Make updating text for conceal mode simpler.  A few compiler warning fixes.
diff --git a/src/edit.c b/src/edit.c
index 9f71061..f465f20 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1457,17 +1457,33 @@
 ins_redraw(ready)
     int		ready UNUSED;	    /* not busy with something */
 {
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
+
     if (!char_avail())
     {
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
 	/* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
 	 * visible, the command might delete it. */
-	if (ready && has_cursormovedI()
-			     && !equalpos(last_cursormoved, curwin->w_cursor)
-# ifdef FEAT_INS_EXPAND
-			     && !pum_visible()
+	if (ready && (
+# ifdef FEAT_AUTOCMD
+		    has_cursormovedI()
 # endif
-			     )
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+		    ||
+# endif
+# ifdef FEAT_CONCEAL
+		    curwin->w_p_conceal
+# endif
+		    )
+	    && !equalpos(last_cursormoved, curwin->w_cursor)
+# ifdef FEAT_INS_EXPAND
+	    && !pum_visible()
+# endif
+	   )
 	{
 # ifdef FEAT_SYN_HL
 	    /* Need to update the screen first, to make sure syntax
@@ -1477,7 +1493,18 @@
 	    if (syntax_present(curwin) && must_redraw)
 		update_screen(0);
 # endif
-	    apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+	    if (has_cursormovedI())
+		apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+	    if (curwin->w_p_conceal)
+	    {
+		conceal_old_cursor_line = last_cursormoved.lnum;
+		conceal_new_cursor_line = curwin->w_cursor.lnum;
+		conceal_update_lines = TRUE;
+	    }
+# endif
 	    last_cursormoved = curwin->w_cursor;
 	}
 #endif
@@ -1485,6 +1512,15 @@
 	    update_screen(0);
 	else if (clear_cmdline || redraw_cmdline)
 	    showmode();		/* clear cmdline and show mode */
+# if defined(FEAT_CONCEAL)
+	if (conceal_update_lines
+		&& conceal_old_cursor_line != conceal_new_cursor_line)
+	{
+	    update_single_line(curwin, conceal_old_cursor_line);
+	    update_single_line(curwin, conceal_new_cursor_line);
+	    curwin->w_valid &= ~VALID_CROW;
+	}
+# endif
 	showruler(FALSE);
 	setcursor();
 	emsg_on_display = FALSE;	/* may remove error message now */
@@ -9123,9 +9159,6 @@
 ins_up(startcol)
     int		startcol;	/* when TRUE move to Insstart.col */
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     pos_T	tpos;
     linenr_T	old_topline = curwin->w_topline;
 #ifdef FEAT_DIFF
@@ -9148,13 +9181,6 @@
 #ifdef FEAT_CINDENT
 	can_cindent = TRUE;
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
     else
 	vim_beep();
@@ -9196,10 +9222,6 @@
 ins_down(startcol)
     int		startcol;	/* when TRUE move to Insstart.col */
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-    linenr_T	oldbotline = curwin->w_botline;
-#endif
     pos_T	tpos;
     linenr_T	old_topline = curwin->w_topline;
 #ifdef FEAT_DIFF
@@ -9222,16 +9244,6 @@
 #ifdef FEAT_CINDENT
 	can_cindent = TRUE;
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    /* Don't do this if we've scrolled, the line is already
-	     * drawn */
-	    if (oldbotline == curwin->w_botline)
-		update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
     else
 	vim_beep();
diff --git a/src/eval.c b/src/eval.c
index 296efda..a415849 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -9437,9 +9437,6 @@
     typval_T	*rettv;
 {
     long	line, col;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 #ifdef FEAT_VIRTUALEDIT
     long	coladd = 0;
 #endif
@@ -9489,13 +9486,6 @@
 #endif
 
     curwin->w_set_curswant = TRUE;
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
     rettv->vval.v_number = 0;
 }
 
@@ -15165,15 +15155,6 @@
     /* If 'n' flag is used: restore cursor position. */
     if (flags & SP_NOMOVE)
 	curwin->w_cursor = save_cursor;
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal
-				 && save_cursor.lnum != curwin->w_cursor.lnum)
-	{
-	    curwin->w_set_curswant = TRUE;
-	    update_single_line(curwin, save_cursor.lnum);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     else
 	curwin->w_set_curswant = TRUE;
 theend:
diff --git a/src/gui.c b/src/gui.c
index c68ee94..392ad54 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4908,19 +4908,57 @@
     void
 gui_update_screen()
 {
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
+
     update_topline();
     validate_cursor();
-#ifdef FEAT_AUTOCMD
+
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
     /* Trigger CursorMoved if the cursor moved. */
-    if (!finish_op && has_cursormoved()
-	    && !equalpos(last_cursormoved, curwin->w_cursor))
+    if (!finish_op && (
+# ifdef FEAT_AUTOCMD
+		has_cursormoved()
+# endif
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+		||
+# endif
+# ifdef FEAT_CONCEAL
+		curwin->w_p_conceal
+# endif
+		)
+		     && !equalpos(last_cursormoved, curwin->w_cursor))
     {
-	apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+	if (has_cursormoved())
+	    apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+	if (curwin->w_p_conceal)
+	{
+	    conceal_old_cursor_line = last_cursormoved.lnum;
+	    conceal_new_cursor_line = curwin->w_cursor.lnum;
+	    conceal_update_lines = TRUE;
+	}
+# endif
 	last_cursormoved = curwin->w_cursor;
     }
 #endif
+
     update_screen(0);	/* may need to update the screen */
     setcursor();
+# if defined(FEAT_CONCEAL)
+    if (conceal_update_lines
+	    && conceal_old_cursor_line != conceal_new_cursor_line)
+    {
+	update_single_line(curwin, conceal_old_cursor_line);
+	update_single_line(curwin, conceal_new_cursor_line);
+	curwin->w_valid &= ~VALID_CROW;
+    }
+# endif
     out_flush();		/* make sure output has been written */
     gui_update_cursor(TRUE, FALSE);
     gui_mch_flush();
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 4e1ce42..2608f1f 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -609,10 +609,12 @@
 	    char *argv[] = {"gvim.exe"};
 	    NtInitialize(&argc, &argv);
 #endif
+	    {
 #ifdef RUBY19_OR_LATER
-	    RUBY_INIT_STACK;
+		RUBY_INIT_STACK;
 #endif
-	    ruby_init();
+		ruby_init();
+	    }
 #ifdef RUBY19_OR_LATER
 	    ruby_script("vim-ruby");
 #endif
diff --git a/src/main.c b/src/main.c
index 2ca1ebe..964bdd5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -980,6 +980,11 @@
 {
     oparg_T	oa;				/* operator arguments */
     int		previous_got_int = FALSE;	/* "got_int" was TRUE */
+#ifdef FEAT_CONCEAL
+    linenr_T	conceal_old_cursor_line = 0;
+    linenr_T	conceal_new_cursor_line = 0;
+    int		conceal_update_lines = FALSE;
+#endif
 
 #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
     /* Setup to catch a terminating error from the X server.  Just ignore
@@ -1079,12 +1084,34 @@
 	    skip_redraw = FALSE;
 	else if (do_redraw || stuff_empty())
 	{
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
 	    /* Trigger CursorMoved if the cursor moved. */
-	    if (!finish_op && has_cursormoved()
-			     && !equalpos(last_cursormoved, curwin->w_cursor))
+	    if (!finish_op && (
+# ifdef FEAT_AUTOCMD
+			has_cursormoved()
+# endif
+# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
+			||
+# endif
+# ifdef FEAT_CONCEAL
+			curwin->w_p_conceal
+# endif
+			)
+		 && !equalpos(last_cursormoved, curwin->w_cursor))
 	    {
-		apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf);
+# ifdef FEAT_AUTOCMD
+		if (has_cursormoved())
+		    apply_autocmds(EVENT_CURSORMOVED, NULL, NULL,
+							       FALSE, curbuf);
+# endif
+# ifdef FEAT_CONCEAL
+		if (curwin->w_p_conceal)
+		{
+		    conceal_old_cursor_line = last_cursormoved.lnum;
+		    conceal_new_cursor_line = curwin->w_cursor.lnum;
+		    conceal_update_lines = TRUE;
+		}
+# endif
 		last_cursormoved = curwin->w_cursor;
 	    }
 #endif
@@ -1164,6 +1191,15 @@
 	    may_clear_sb_text();	/* clear scroll-back text on next msg */
 	    showruler(FALSE);
 
+# if defined(FEAT_CONCEAL)
+	    if (conceal_update_lines
+		    && conceal_old_cursor_line != conceal_new_cursor_line)
+	    {
+		update_single_line(curwin, conceal_old_cursor_line);
+		update_single_line(curwin, conceal_new_cursor_line);
+		curwin->w_valid &= ~VALID_CROW;
+	    }
+# endif
 	    setcursor();
 	    cursor_on();
 
diff --git a/src/normal.c b/src/normal.c
index 9ad32f7..1457883 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -2298,9 +2298,6 @@
     int		old_mode = VIsual_mode;
 #endif
     int		regname;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
 #if defined(FEAT_FOLDING)
     save_cursor = curwin->w_cursor;
@@ -2773,14 +2770,6 @@
 	    curwin->w_cursor = save_cursor;
     }
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && moved
-		&& (old_curwin != curwin || oldline != curwin->w_cursor.lnum))
-    {
-	update_single_line(old_curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 
 #if defined(FEAT_CLIPBOARD) && defined(FEAT_CMDWIN)
     if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available)
@@ -5713,9 +5702,6 @@
     linenr_T	lnum;
 #endif
     int		half;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     cap->oap->motion_type = MLINE;
     setpcmark();
@@ -5803,13 +5789,6 @@
 
     cursor_correct();	/* correct for 'so' */
     beginline(BL_SOL | BL_FIX);
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -5825,9 +5804,6 @@
 #else
 # define PAST_LINE 0
 #endif
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
     {
@@ -5932,13 +5908,6 @@
 					       && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -5951,9 +5920,6 @@
     cmdarg_T	*cap;
 {
     long	n;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
     {
@@ -6012,13 +5978,6 @@
 					       && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -6037,21 +5996,11 @@
     }
     else
     {
-#ifdef FEAT_CONCEAL
-	linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 	cap->oap->motion_type = MLINE;
 	if (cursor_up(cap->count1, cap->oap->op_type == OP_NOP) == FAIL)
 	    clearopbeep(cap->oap);
 	else if (cap->arg)
 	    beginline(BL_WHITE | BL_FIX);
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
@@ -6080,10 +6029,6 @@
     else
 #endif
     {
-#ifdef FEAT_CONCEAL
-	linenr_T	oldline = curwin->w_cursor.lnum;
-	linenr_T	oldbotline = curwin->w_botline;
-#endif
 #ifdef FEAT_CMDWIN
 	/* In the cmdline window a <CR> executes the command. */
 	if (cmdwin_type != 0 && cap->cmdchar == CAR)
@@ -6096,16 +6041,6 @@
 		clearopbeep(cap->oap);
 	    else if (cap->arg)
 		beginline(BL_WHITE | BL_FIX);
-#ifdef FEAT_CONCEAL
-	    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	    {
-		update_single_line(curwin, oldline);
-		/* Don't do this if we've scrolled, the line is already
-		 * drawn */
-		if (oldbotline == curwin->w_botline)
-		    update_single_line(curwin, curwin->w_cursor.lnum);
-	    }
-#endif
 	}
     }
 }
@@ -6664,7 +6599,7 @@
     cmdarg_T	*cap;
 {
     pos_T	*pos;
-#if defined(FEAT_FOLDING) || defined(FEAT_CONCEAL)
+#if defined(FEAT_FOLDING)
     linenr_T	lnum = curwin->w_cursor.lnum;
 #endif
 
@@ -6716,13 +6651,6 @@
 	    && KeyTyped)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && lnum != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, lnum);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 }
 
 /*
@@ -6777,9 +6705,6 @@
 nv_findpar(cap)
     cmdarg_T	*cap;
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
     cap->oap->use_reg_one = TRUE;
@@ -6795,13 +6720,6 @@
 	if ((fdo_flags & FDO_BLOCK) && KeyTyped && cap->oap->op_type == OP_NOP)
 	    foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
@@ -7723,9 +7641,6 @@
 #endif
     int		i;
     int		flag = FALSE;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline;
-#endif
 
     switch (cap->nchar)
     {
@@ -7867,9 +7782,6 @@
     case K_DOWN:
 	/* with 'nowrap' it works just like the normal "j" command; also when
 	 * in a closed fold */
-#ifdef FEAT_CONCEAL
-	oldline = curwin->w_cursor.lnum;
-#endif
 	if (!curwin->w_p_wrap
 #ifdef FEAT_FOLDING
 		|| hasFolding(curwin->w_cursor.lnum, NULL, NULL)
@@ -7883,22 +7795,12 @@
 	    i = nv_screengo(oap, FORWARD, cap->count1);
 	if (i == FAIL)
 	    clearopbeep(oap);
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 	break;
 
     case 'k':
     case K_UP:
 	/* with 'nowrap' it works just like the normal "k" command; also when
 	 * in a closed fold */
-#ifdef FEAT_CONCEAL
-	oldline = curwin->w_cursor.lnum;
-#endif
 	if (!curwin->w_p_wrap
 #ifdef FEAT_FOLDING
 		|| hasFolding(curwin->w_cursor.lnum, NULL, NULL)
@@ -7912,13 +7814,6 @@
 	    i = nv_screengo(oap, BACKWARD, cap->count1);
 	if (i == FAIL)
 	    clearopbeep(oap);
-#ifdef FEAT_CONCEAL
-	else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
 	break;
 
     /*
@@ -8545,9 +8440,6 @@
 nv_bck_word(cap)
     cmdarg_T	*cap;
 {
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     cap->oap->motion_type = MCHAR;
     cap->oap->inclusive = FALSE;
     curwin->w_set_curswant = TRUE;
@@ -8557,13 +8449,6 @@
     else if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -8578,9 +8463,6 @@
     int		word_end;
     int		flag = FALSE;
     pos_T	startpos = curwin->w_cursor;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = startpos.lnum;
-#endif
 
     /*
      * Set inclusive for the "E" and "e" command.
@@ -8658,13 +8540,6 @@
 	    foldOpenCursor();
 #endif
     }
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 }
 
 /*
@@ -8827,10 +8702,6 @@
     if ((fdo_flags & FDO_JUMP) && KeyTyped && cap->oap->op_type == OP_NOP)
 	foldOpenCursor();
 #endif
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal)
-	changed_window_setting();
-#endif
 }
 
 /*
@@ -9256,9 +9127,6 @@
     int		empty = FALSE;
     int		was_visual = FALSE;
 #endif
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
     int		dir;
     int		flags = 0;
 
@@ -9378,13 +9246,6 @@
 	}
 #endif
 	auto_format(FALSE, TRUE);
-#ifdef FEAT_CONCEAL
-	if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-	{
-	    update_single_line(curwin, oldline);
-	    update_single_line(curwin, curwin->w_cursor.lnum);
-	}
-#endif
     }
 }
 
diff --git a/src/search.c b/src/search.c
index 76ba660..3ad9140 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1077,9 +1077,6 @@
     char_u	    *dircp;
     char_u	    *strcopy = NULL;
     char_u	    *ps;
-#ifdef FEAT_CONCEAL
-    linenr_T	oldline = curwin->w_cursor.lnum;
-#endif
 
     /*
      * A line offset is not remembered, this is vi compatible.
@@ -1425,13 +1422,6 @@
 	setpcmark();
     curwin->w_cursor = pos;
     curwin->w_set_curswant = TRUE;
-#ifdef FEAT_CONCEAL
-    if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum)
-    {
-	update_single_line(curwin, oldline);
-	update_single_line(curwin, curwin->w_cursor.lnum);
-    }
-#endif
 
 end_do_search:
     if (options & SEARCH_KEEP)
diff --git a/src/undo.c b/src/undo.c
index 33ca01e..497fc6b 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1551,7 +1551,7 @@
     int		num_head = 0;
     long	old_header_seq, new_header_seq, cur_header_seq;
     long	seq_last, seq_cur;
-    long_u	last_save_nr = 0;
+    long	last_save_nr = 0;
     short	old_idx = -1, new_idx = -1, cur_idx = -1;
     long	num_read_uhps = 0;
     time_t	seq_time;
@@ -2662,6 +2662,18 @@
     else
 	u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time);
 
+#ifdef FEAT_CONCEAL
+    {
+	win_T	*wp;
+
+	FOR_ALL_WINDOWS(wp)
+	{
+	    if (wp->w_buffer == curbuf && wp->w_p_conceal)
+		redraw_win_later(wp, NOT_VALID);
+	}
+    }
+#endif
+
     smsg((char_u *)_("%ld %s; %s #%ld  %s"),
 	    u_oldcount < 0 ? -u_oldcount : u_oldcount,
 	    _(msgstr),
@@ -3230,7 +3242,7 @@
 	if (dict == NULL)
 	    return;
 	dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
-	dict_add_nr_str(dict, "time", uhp->uh_time, NULL);
+	dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
 	if (uhp == curbuf->b_u_newhead)
 	    dict_add_nr_str(dict, "newhead", 1, NULL);
 	if (uhp == curbuf->b_u_curhead)