Just use default behaviour on tabstops when using too many columns.
It seems I didn't fix this issue before committing teken to the tree. My initial idea was to somehow add an error mechanism to instruct the video driver author to increase T_NUMCOL when using very big terminals. It turns out we have platforms where we have gigantic consoles on systems like the Apple PowerMac G5, which means we crash there right now. Just ignore tabstops placed beyond column 160. Just force tabs to be placed on each 8 columns. Reported by: nwhitehorn
This commit is contained in:
parent
bc3977f122
commit
3e1720f5e0
@ -361,8 +361,6 @@ void
|
||||
teken_set_winsize(teken_t *t, const teken_pos_t *p)
|
||||
{
|
||||
|
||||
teken_assert(p->tp_col <= T_NUMCOL);
|
||||
|
||||
t->t_winsize = *p;
|
||||
/* XXX: bounds checking with cursor/etc! */
|
||||
t->t_scrollreg.ts_begin = 0;
|
||||
|
@ -37,7 +37,8 @@ teken_tab_isset(teken_t *t, unsigned int col)
|
||||
{
|
||||
unsigned int b, o;
|
||||
|
||||
teken_assert(col <= T_NUMCOL);
|
||||
if (col >= T_NUMCOL)
|
||||
return ((col & 0x7) == 0);
|
||||
|
||||
b = col / (sizeof(unsigned int) * 8);
|
||||
o = col % (sizeof(unsigned int) * 8);
|
||||
@ -50,7 +51,8 @@ teken_tab_clear(teken_t *t, unsigned int col)
|
||||
{
|
||||
unsigned int b, o;
|
||||
|
||||
teken_assert(col <= T_NUMCOL);
|
||||
if (col >= T_NUMCOL)
|
||||
return;
|
||||
|
||||
b = col / (sizeof(unsigned int) * 8);
|
||||
o = col % (sizeof(unsigned int) * 8);
|
||||
@ -63,7 +65,8 @@ teken_tab_set(teken_t *t, unsigned int col)
|
||||
{
|
||||
unsigned int b, o;
|
||||
|
||||
teken_assert(col <= T_NUMCOL);
|
||||
if (col >= T_NUMCOL)
|
||||
return;
|
||||
|
||||
b = col / (sizeof(unsigned int) * 8);
|
||||
o = col % (sizeof(unsigned int) * 8);
|
||||
|
Loading…
Reference in New Issue
Block a user