* The screen buffers for visual mode are now dynamically allocated, so

vi usually does not return to ex mode with "screen too large" when the
  terminal is resized on a large monitor anymore.
This commit is contained in:
Gunnar Ritter
2005-08-04 12:09:59 +00:00
parent c69b1ee369
commit 2b70d8e5eb
15 changed files with 72 additions and 57 deletions

View File

@@ -72,7 +72,7 @@
*
* from ex_vis.h 7.4 (Berkeley) 5/31/85
*
* @(#)ex_vis.h 1.18 (gritter) 3/24/05
* Sccsid @(#)ex_vis.h 1.20 (gritter) 8/4/05
*/
/*
@@ -99,6 +99,13 @@ var enum {
HARDOPEN = 3
} bastate, state;
/*
* Maximum screen size in visual mode, dynamically set as needed.
*/
var short TUBELINES;
var short TUBECOLS;
var short TUBESIZE;
/*
* The screen in visual and crtopen is of varying size; the basic
* window has top basWTOP and basWLINES lines are thereby implied.
@@ -140,7 +147,7 @@ struct vlinfo {
short vdepth; /* Depth of displayed line */ /*mjm: was char */
short vflags; /* Is line potentially dirty ? */
};
var struct vlinfo vlinfo[TUBELINES + 2];
var struct vlinfo *vlinfo;
#define DEPTH(c) (vlinfo[c].vdepth)
#define LINE(c) (vlinfo[c].vliny)
@@ -170,7 +177,7 @@ var short vcnt;
* data itself. It is also rearranged during insert mode across line
* boundaries to make incore work easier.
*/
var cell *vtube[TUBELINES];
var cell **vtube;
var cell *vtube0;
/*