version 1.20, 2016/03/26 08:59:29 |
version 1.21, 2016/09/17 15:06:41 |
|
|
if (n < MIN_LINENUM_WIDTH) |
if (n < MIN_LINENUM_WIDTH) |
n = MIN_LINENUM_WIDTH; |
n = MIN_LINENUM_WIDTH; |
snprintf(linebuf+curr, size_linebuf-curr, "%*s ", n, buf); |
snprintf(linebuf+curr, size_linebuf-curr, "%*s ", n, buf); |
n++; /* One space after the line number. */ |
n++; /* One space after the line number. */ |
for (i = 0; i < n; i++) |
for (i = 0; i < n; i++) |
attr[curr+i] = AT_NORMAL; |
attr[curr+i] = AT_NORMAL; |
curr += n; |
curr += n; |
|
|
* Search backwards for either an ESC (which means we ARE in a seq); |
* Search backwards for either an ESC (which means we ARE in a seq); |
* or an end char (which means we're NOT in a seq). |
* or an end char (which means we're NOT in a seq). |
*/ |
*/ |
for (p = &linebuf[curr]; p > linebuf; ) { |
for (p = &linebuf[curr]; p > linebuf; ) { |
LWCHAR ch = step_char(&p, -1, linebuf); |
LWCHAR ch = step_char(&p, -1, linebuf); |
if (IS_CSI_START(ch)) |
if (IS_CSI_START(ch)) |
return (1); |
return (1); |
|
|
to_tab = tabdefault - |
to_tab = tabdefault - |
((to_tab - tabstops[ntabstops-1]) % tabdefault); |
((to_tab - tabstops[ntabstops-1]) % tabdefault); |
else { |
else { |
for (i = ntabstops - 2; i >= 0; i--) |
for (i = ntabstops - 2; i >= 0; i--) |
if (to_tab >= tabstops[i]) |
if (to_tab >= tabstops[i]) |
break; |
break; |
to_tab = tabstops[i+1] - to_tab; |
to_tab = tabstops[i+1] - to_tab; |