mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-24 06:25:35 +02:00
Manual Merge change f26780ecfb8f6ebff742360c96ebe51285bb4a35
ID Author Date Message f26780ecfb8f6ebff742360c96ebe51285bb4a35 Ray Hayes <rayhayes@rhbe.net> 9/16/2016 3:26:06 PM -07:00 Fix ESC character parsing when # missing.
This commit is contained in:
parent
d81a9834e2
commit
3e23785c66
@ -52,9 +52,10 @@
|
|||||||
TelParams Parameters;
|
TelParams Parameters;
|
||||||
|
|
||||||
extern int ScreenX;
|
extern int ScreenX;
|
||||||
extern int ScreenY;
|
extern int ScreenY;
|
||||||
extern int ScrollTop;
|
extern int ScrollTop;
|
||||||
extern int ScrollBottom;
|
extern int ScrollBottom;
|
||||||
|
|
||||||
// end of imports from outside module
|
// end of imports from outside module
|
||||||
|
|
||||||
bool gbVTAppMode = false;
|
bool gbVTAppMode = false;
|
||||||
@ -80,7 +81,8 @@ int bCS0 = 0;
|
|||||||
int bCS1 = 0;
|
int bCS1 = 0;
|
||||||
int bBkMode = 0;
|
int bBkMode = 0;
|
||||||
int bCharMode = 0;
|
int bCharMode = 0;
|
||||||
|
int ReportedX = 0;
|
||||||
|
int ReportedY = 0;
|
||||||
|
|
||||||
BOOL fShiftOut = FALSE;
|
BOOL fShiftOut = FALSE;
|
||||||
BOOL InPrintMode = FALSE;
|
BOOL InPrintMode = FALSE;
|
||||||
@ -544,6 +546,8 @@ unsigned char * ParseANSI(unsigned char * pszBuffer, unsigned char * pszBufferEn
|
|||||||
if (bMode & MODE_BRK)
|
if (bMode & MODE_BRK)
|
||||||
{
|
{
|
||||||
// Cursor left
|
// Cursor left
|
||||||
|
if (iParam[0] == 0)
|
||||||
|
iParam[0] = 1;
|
||||||
ConMoveCursorPosition(-iParam[0], 0);
|
ConMoveCursorPosition(-iParam[0], 0);
|
||||||
}
|
}
|
||||||
else if (bMode == 0)
|
else if (bMode == 0)
|
||||||
@ -570,15 +574,27 @@ unsigned char * ParseANSI(unsigned char * pszBuffer, unsigned char * pszBufferEn
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
|
if (bMode & MODE_EXT)
|
||||||
|
{
|
||||||
|
if (iParam[0] == 4 && iParam[1] == 7) {
|
||||||
|
ConSaveScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
case 'l': // ^[?25h
|
case 'l': // ^[?25h
|
||||||
if (bMode & MODE_EXT)
|
if (bMode & MODE_EXT)
|
||||||
{
|
{
|
||||||
if (iParam[0] == 4) {
|
if (iParam[0] == 4 && iParam[1] == 7) {
|
||||||
VTMode |= MODE_IRM_INSERT;
|
ConRestoreScreen();
|
||||||
}
|
}
|
||||||
int i;
|
else
|
||||||
for ( i = 0; i < iCurrentParam; i++ )
|
{
|
||||||
ConSetExtendedMode(iParam[i], *pszCurrent=='h' ? 1 : 0);
|
if (iParam[0] == 4) {
|
||||||
|
VTMode |= MODE_IRM_INSERT;
|
||||||
|
}
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < iCurrentParam; i++)
|
||||||
|
ConSetExtendedMode(iParam[i], *pszCurrent == 'h' ? 1 : 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (bMode & MODE_BRK)
|
else if (bMode & MODE_BRK)
|
||||||
{
|
{
|
||||||
@ -618,12 +634,14 @@ unsigned char * ParseANSI(unsigned char * pszBuffer, unsigned char * pszBufferEn
|
|||||||
ConSetAttribute(iParam, iCurrentParam);
|
ConSetAttribute(iParam, iCurrentParam);
|
||||||
fcompletion = 1;
|
fcompletion = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
fcompletion = 1;
|
fcompletion = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'R':
|
||||||
case 'H':
|
ReportedX = iParam[1];
|
||||||
|
ReportedY = iParam[0];
|
||||||
|
break;
|
||||||
|
case 'H':
|
||||||
case 'f':
|
case 'f':
|
||||||
if (bMode & MODE_BRK)
|
if (bMode & MODE_BRK)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -172,6 +172,7 @@
|
|||||||
#define NEXT_KEY "\x1b[6~"
|
#define NEXT_KEY "\x1b[6~"
|
||||||
#define SHIFT_TAB_KEY "\x1b[~"
|
#define SHIFT_TAB_KEY "\x1b[~"
|
||||||
#define ESCAPE_KEY "\x1b"
|
#define ESCAPE_KEY "\x1b"
|
||||||
|
#define BACKSPACE_KEY "\b"
|
||||||
|
|
||||||
#define TERMINAL_ID "\x1b[?1;2c"
|
#define TERMINAL_ID "\x1b[?1;2c"
|
||||||
#define STATUS_REPORT "\x1b[2;5R"
|
#define STATUS_REPORT "\x1b[2;5R"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user