Skip to content

Commit

Permalink
Fix typo in CTermData::PutChar()
Browse files Browse the repository at this point in the history
  • Loading branch information
hwangcc23 committed Apr 6, 2016
1 parent 40337e3 commit c69e6ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/termdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void CTermData::PutChar(unsigned char ch)
Tab();
break;
}
}
}
else // not C0 control characters, check if we're in control sequence.
{
switch( m_CmdLine[0] )
Expand Down Expand Up @@ -367,7 +367,7 @@ void CTermData::PutChar(unsigned char ch)
m_CaretPos.x++;
break;
}
// m_CmdLine[0] == '\0' means we're currently in ANSI control sequence.
// m_CmdLine[0] != '\0' means we're currently in ANSI control sequence.
// Store ch to CmdLine, and parse ANSI escape sequence when ready.
case '\x1b': // ESC, in ANSI escape mode
if( m_pCmdLine < (m_CmdLine +sizeof(m_CmdLine)) )
Expand All @@ -389,7 +389,7 @@ void CTermData::PutChar(unsigned char ch)

if( m_pCmdLine < (m_CmdLine +sizeof(m_CmdLine)) )
*m_pCmdLine = '\0';
// Current ANSI escape type is stored in *m_pBuf.
// Current ANSI escape type is stored in *m_CmdLine.
ParseAnsiEscapeSequence( (const char*)m_CmdLine, ch);
m_CmdLine[0] = '\0';
m_pCmdLine = m_CmdLine;
Expand Down

0 comments on commit c69e6ab

Please sign in to comment.