Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dvtm.info
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ dvtm|dynamic virtual terminal manager,
ri=\EM,
ritm=\E[23m,
rmacs=^O,
rmam=\E[?7l,
rmcup=\E[2J\E[?47l\E8,
rmir=\E[4l,
rmso=\E[27m,
Expand All @@ -121,6 +122,7 @@ dvtm|dynamic virtual terminal manager,
sgr0=\E[m\017,
sitm=\E[3m,
smacs=^N,
smam=\E[?7h,
smcup=\E7\E[?47h,
smir=\E[4h,
smso=\E[7m,
Expand Down
8 changes: 8 additions & 0 deletions vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ struct Vt {
unsigned mousetrack:1;
unsigned graphmode:1;
unsigned savgraphmode:1;
unsigned truncate:1;
bool charsets[2];
/* buffers and parsing state */
char rbuf[BUFSIZ];
Expand Down Expand Up @@ -962,6 +963,9 @@ static void interpret_csi_priv_mode(Vt *t, int param[], int pcount, bool set)
case 6: /* set origin to relative/absolute (DECOM) */
t->relposmode = set;
break;
case 7:
t->truncate = !set;
break;
case 25: /* make cursor visible/invisible (DECCM) */
t->curshid = !set;
break;
Expand Down Expand Up @@ -1379,6 +1383,10 @@ static void put_wc(Vt *t, wchar_t wc)
}

if (b->curs_col >= b->cols) {
if (t->truncate && wc != '\n') {
b->curs_col++;
return;
}
b->curs_col = 0;
cursor_line_down(t);
}
Expand Down