diff src/screen.c @ 3413:8332129d9ae8 v7.3.472

updated for version 7.3.472 Problem: Crash when using ":redraw" in a BufEnter autocommand and switching to another tab. (??) Solution: Move triggering the the autocommands to after correcting the option values. Also check the row value to be out of bounds. (Christian Brabandt, Sergey Khorev)
author Bram Moolenaar <bram@vim.org>
date Fri, 16 Mar 2012 19:07:58 +0100
parents c70c005f61fb
children 3db4282d5e6b
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -5371,6 +5371,12 @@ screen_line(row, coloff, endcol, clear_w
 # define CHAR_CELLS 1
 #endif
 
+    /* Check for illegal row and col, just in case. */
+    if (row >= Rows)
+	row = Rows - 1;
+    if (endcol > Columns)
+	endcol = Columns;
+
 # ifdef FEAT_CLIPBOARD
     clip_may_clear_selection(row, row);
 # endif