- SetPosX/Y were wrong, but not yet used.
- implemented HPA/VPA (CV/CH) sequences (set absolute v and h position). It's optional but because the beterm termcap advertises it we must implement it. Also note beterm increments args unlike others. This fixes all obvious display issues with the rhapsody IRC client (a small ncurses client I ported). - maybe we should switch the CASE_* to an enum ? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25392 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85b80c5229
commit
eed037b637
@ -883,6 +883,26 @@ TermParse::EscParse()
|
||||
parsestate = groundtable;
|
||||
break;
|
||||
|
||||
case CASE_VPA: // ESC [...d move cursor absolute vertical
|
||||
/* VPA (CV) */
|
||||
if ((row = param[0]) < 1)
|
||||
row = 1;
|
||||
|
||||
// note beterm wants it 1-based unlike usual terminals
|
||||
fView->SetCurY(row - 1);
|
||||
parsestate = groundtable;
|
||||
break;
|
||||
|
||||
case CASE_HPA: // ESC [...G move cursor absolute horizontal
|
||||
/* HPA (CH) */
|
||||
if ((col = param[0]) < 1)
|
||||
col = 1;
|
||||
|
||||
// note beterm wants it 1-based unlike usual terminals
|
||||
fView->SetCurX(col - 1);
|
||||
parsestate = groundtable;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -838,7 +838,7 @@ TermView::SetCurPos(int x, int y)
|
||||
void
|
||||
TermView::SetCurX(int x)
|
||||
{
|
||||
if (x >= 0 && x < fTermRows) {
|
||||
if (x >= 0 && x < fTermColumns) {
|
||||
UpdateLine();
|
||||
fCurPos.x = x;
|
||||
}
|
||||
@ -849,7 +849,7 @@ TermView::SetCurX(int x)
|
||||
void
|
||||
TermView::SetCurY(int y)
|
||||
{
|
||||
if (y >= 0 && y < fTermColumns) {
|
||||
if (y >= 0 && y < fTermRows) {
|
||||
UpdateLine();
|
||||
fCurPos.y = y;
|
||||
}
|
||||
|
@ -1096,7 +1096,7 @@ CASE_CUF,
|
||||
CASE_CUB,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_HPA,
|
||||
/* H I J K */
|
||||
CASE_CUP,
|
||||
CASE_GROUND_STATE,
|
||||
@ -1133,7 +1133,7 @@ CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_GROUND_STATE,
|
||||
/* d e f g */
|
||||
CASE_GROUND_STATE,
|
||||
CASE_VPA,
|
||||
CASE_GROUND_STATE,
|
||||
CASE_CUP,
|
||||
CASE_GROUND_STATE,
|
||||
|
@ -116,3 +116,6 @@
|
||||
#define CASE_SJIS_KANA 84
|
||||
#define CASE_PRINT_GR 85
|
||||
#define CASE_PRINT_CS96 86
|
||||
// additions, maybe reorder/reuse older ones ?
|
||||
#define CASE_VPA 87
|
||||
#define CASE_HPA 88
|
||||
|
Loading…
Reference in New Issue
Block a user