summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_refresh.c
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2011-06-02 10:50:35 +0200
committerFrank Terbeck <ft@bewatermyfriend.org>2011-06-02 10:50:35 +0200
commit2438a0e95aa448f0aeda468752444306b44fe7d0 (patch)
tree8477e9c6af360f6a89af13e8cb5f2a4f9c1cff2c /Src/Zle/zle_refresh.c
parentb495ba1e5a3ab1396844490ad8cad17dec23d6c1 (diff)
parent21266db1d9ae433bf1dcb196a4e258c00541b599 (diff)
downloadzsh-2438a0e95aa448f0aeda468752444306b44fe7d0.tar.gz
zsh-2438a0e95aa448f0aeda468752444306b44fe7d0.zip
Merge commit 'zsh-4.3.12' into debian
Diffstat (limited to 'Src/Zle/zle_refresh.c')
-rw-r--r--Src/Zle/zle_refresh.c49
1 files changed, 10 insertions, 39 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 3b60285c9..797f86251 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -210,50 +210,21 @@ int predisplaylen, postdisplaylen;
static int default_atr_on, special_atr_on;
-/* Flags for the region_highlight structure */
-enum {
- /* Offsets include predisplay */
- ZRH_PREDISPLAY = 1
-};
-
-/*
- * Attributes used for highlighting regions.
- * and mark.
- */
-struct region_highlight {
- /* Attributes turned on in the region */
- int atr;
- /* Start of the region */
- int start;
- /*
- * End of the region: position of the first character not highlighted
- * (the same system as for point and mark).
- */
- int end;
- /*
- * Any of the flags defined above.
- */
- int flags;
-};
/*
* Array of region highlights, no special termination.
* The first element (0) always describes the region between
* point and mark. Any other elements are set by the user
* via the parameter region_highlight.
*/
+
+/**/
struct region_highlight *region_highlights;
-/*
- * Count of special uses of region highlighting, which account
- * for the first few elements of region_highlights.
- * 0: region between point and mark
- * 1: isearch region
- * 2: suffix
- */
-#define N_SPECIAL_HIGHLIGHTS (3)
+
/*
* Number of elements in region_highlights.
* This includes the special elements above.
*/
+/**/
int n_region_highlights;
/*
@@ -717,12 +688,12 @@ resetvideo(void)
{
int ln;
- winw = columns; /* terminal width */
+ winw = zterm_columns; /* terminal width */
if (termflags & TERM_SHORT)
winh = 1;
else
- winh = (lines < 2) ? 24 : lines;
- rwinh = lines; /* keep the real number of lines */
+ winh = (zterm_lines < 2) ? 24 : zterm_lines;
+ rwinh = zterm_lines; /* keep the real number of lines */
vln = vmaxln = winprompt = 0;
winpos = -1;
if (winw_alloc != winw || winh_alloc != winh) {
@@ -1111,7 +1082,7 @@ zrefresh(void)
cleareol = 0; /* unset */
more_start = more_end = 0; /* unset */
- if (isset(SINGLELINEZLE) || lines < 3
+ if (isset(SINGLELINEZLE) || zterm_lines < 3
|| (termflags & (TERM_NOUP | TERM_BAD | TERM_UNKNOWN)))
termflags |= TERM_SHORT;
else
@@ -1167,7 +1138,7 @@ zrefresh(void)
}
fflush(shout);
clearf = clearflag;
- } else if (winw != columns || rwinh != lines)
+ } else if (winw != zterm_columns || rwinh != zterm_lines)
resetvideo();
/* now winw equals columns and winh equals lines
@@ -2033,7 +2004,7 @@ refreshline(int ln)
* last line lest undesired scrolling occurs due to `illegal'
* characters on screen
*/
- if (tccan(TCINS) && (vln != lines - 1)) {
+ if (tccan(TCINS) && (vln != zterm_lines - 1)) {
/* not on last line */
for (i = 1; nl[i].chr; i++) {
if (tcinscost(i) < wpfxlen(ol, nl + i)) {