termptyesc: store when tab are inserted and where they stop
This commit is contained in:
parent
7dcb9e4e43
commit
e1ff4d877e
|
@ -81,12 +81,14 @@ struct _Termatt
|
|||
unsigned short fraktur : 1;
|
||||
unsigned short framed : 1;
|
||||
unsigned short encircled : 1;
|
||||
unsigned short overlined : 1;
|
||||
unsigned short overlined : 1; // TODO: support it
|
||||
unsigned short tab_inserted : 1;
|
||||
unsigned short tab_last : 1;
|
||||
#if defined(SUPPORT_80_132_COLUMNS)
|
||||
unsigned short is_80_132_mode_allowed : 1;
|
||||
unsigned short bit_padding : 11;
|
||||
unsigned short bit_padding : 9;
|
||||
#else
|
||||
unsigned short bit_padding : 12;
|
||||
unsigned short bit_padding : 10;
|
||||
#endif
|
||||
uint16_t link_id;
|
||||
};
|
||||
|
|
|
@ -207,6 +207,8 @@ _cursor_to_start_of_line(Termpty *ty)
|
|||
static void
|
||||
_handle_cursor_control(Termpty *ty, const Eina_Unicode *cc)
|
||||
{
|
||||
Termcell *cell;
|
||||
|
||||
switch (*cc)
|
||||
{
|
||||
case 0x07: // BEL '\a' (bell)
|
||||
|
@ -220,7 +222,11 @@ _handle_cursor_control(Termpty *ty, const Eina_Unicode *cc)
|
|||
return;
|
||||
case 0x09: // HT '\t' (horizontal tab)
|
||||
DBG("->HT");
|
||||
cell = &(TERMPTY_SCREEN(ty, ty->cursor_state.cx, ty->cursor_state.cy));
|
||||
cell->att.tab_inserted = 1;
|
||||
_tab_forward(ty, 1);
|
||||
cell = &(TERMPTY_SCREEN(ty, ty->cursor_state.cx -1, ty->cursor_state.cy));
|
||||
cell->att.tab_last = 1;
|
||||
return;
|
||||
case 0x0a: // LF '\n' (new line)
|
||||
case 0x0b: // VT '\v' (vertical tab)
|
||||
|
|
|
@ -427,6 +427,8 @@ termpty_reset_att(Termatt *att)
|
|||
att->framed = 0;
|
||||
att->encircled = 0;
|
||||
att->overlined = 0;
|
||||
att->tab_inserted = 0;
|
||||
att->tab_last = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue