summaryrefslogtreecommitdiffstats
path: root/konsole
diff options
context:
space:
mode:
Diffstat (limited to 'konsole')
-rw-r--r--konsole/konsole/TEScreen.cpp37
-rw-r--r--konsole/konsole/TEScreen.h18
-rw-r--r--konsole/konsole/TEmuVt102.cpp6
3 files changed, 51 insertions, 10 deletions
diff --git a/konsole/konsole/TEScreen.cpp b/konsole/konsole/TEScreen.cpp
index f0ca2b176..cd8c07b31 100644
--- a/konsole/konsole/TEScreen.cpp
+++ b/konsole/konsole/TEScreen.cpp
@@ -192,6 +192,43 @@ void TEScreen::cursorRight(int n)
Set top and bottom margin.
*/
+void TEScreen::cursorNextLine(int n)
+//=CNL
+{
+ if (n == 0)
+ {
+ n = 1; // Default
+ }
+ cuX = 0;
+ while (n > 0)
+ {
+ if (cuY < lines - 1)
+ {
+ cuY += 1;
+ }
+ n--;
+ }
+
+}
+
+void TEScreen::cursorPrevLine(int n)
+//=CPL
+{
+ if (n == 0)
+ {
+ n = 1; // Default
+ }
+ cuX = 0;
+ while (n > 0)
+ {
+ if (cuY > 0)
+ {
+ cuY -= 1;
+ }
+ n--;
+ }
+}
+
void TEScreen::setMargins(int top, int bot)
//=STBM
{
diff --git a/konsole/konsole/TEScreen.h b/konsole/konsole/TEScreen.h
index 557a07e4c..a28aab949 100644
--- a/konsole/konsole/TEScreen.h
+++ b/konsole/konsole/TEScreen.h
@@ -52,14 +52,16 @@ public: // these are all `Screen' operations
//
// Cursor Movement
//
- void cursorUp (int n);
- void cursorDown (int n);
- void cursorLeft (int n);
- void cursorRight (int n);
- void setCursorY (int y);
- void setCursorX (int x);
- void setCursorYX (int y, int x);
- void setMargins (int t, int b);
+ void cursorUp (int n);
+ void cursorDown (int n);
+ void cursorLeft (int n);
+ void cursorRight (int n);
+ void cursorNextLine(int n);
+ void cursorPrevLine(int n);
+ void setCursorY (int y);
+ void setCursorX (int x);
+ void setCursorYX (int y, int x);
+ void setMargins (int t, int b);
//
// Cursor Movement with Scrolling
//
diff --git a/konsole/konsole/TEmuVt102.cpp b/konsole/konsole/TEmuVt102.cpp
index b5ca0ea5b..fb38b6e18 100644
--- a/konsole/konsole/TEmuVt102.cpp
+++ b/konsole/konsole/TEmuVt102.cpp
@@ -172,7 +172,7 @@ void TEmuVt102::reset()
// Tokens ------------------------------------------------------------------ --
/*
- Since the tokens are the central notion if this section, we've put them
+ Since the tokens are the central notion in this section, we've put them
in front. They provide the syntactical elements used to represent the
terminals operations as byte sequences.
@@ -267,7 +267,7 @@ void TEmuVt102::initTokenizer()
for(i = 0; i < 256; i++) tbl[ i] = 0;
for(i = 0; i < 32; i++) tbl[ i] |= CTL;
for(i = 32; i < 256; i++) tbl[ i] |= CHR;
- for(s = (UINT8*)"@ABCDGHILMPSTXZbcdfry"; *s; s++) tbl[*s] |= CPN;
+ for(s = (UINT8*)"@ABCDEFGHILMPSTXZbcdfry"; *s; s++) tbl[*s] |= CPN;
// resize = \e[8;<row>;<col>t
for(s = (UINT8*)"t"; *s; s++) tbl[*s] |= CPS;
for(s = (UINT8*)"0123456789" ; *s; s++) tbl[*s] |= DIG;
@@ -621,6 +621,8 @@ switch( N )
case TY_CSI_PN('B' ) : scr->cursorDown (p ); break; //VT100
case TY_CSI_PN('C' ) : scr->cursorRight (p ); break; //VT100
case TY_CSI_PN('D' ) : scr->cursorLeft (p ); break; //VT100
+ case TY_CSI_PN('E' ) : scr->cursorNextLine (p ); break; //VT100
+ case TY_CSI_PN('F' ) : scr->cursorPrevLine (p ); break; //VT100
case TY_CSI_PN('G' ) : scr->setCursorX (p ); break; //LINUX
case TY_CSI_PN('H' ) : scr->setCursorYX (p, q); break; //VT100
case TY_CSI_PN('I' ) : scr->Tabulate (p ); break;