diff --git a/source/ps/CConsole.cpp b/source/ps/CConsole.cpp index 2095339f71..3e6ef200da 100644 --- a/source/ps/CConsole.cpp +++ b/source/ps/CConsole.cpp @@ -406,67 +406,28 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked ) // BEGIN: Buffer History Lookup case SDLK_UP: - if ( m_deqBufHistory.size() ) + if (m_deqBufHistory.size() && iHistoryPos != (int)m_deqBufHistory.size() - 1) { - int oldHistoryPos = iHistoryPos; - while( iHistoryPos != (int)m_deqBufHistory.size() - 1) - { - iHistoryPos++; - std::wstring& histString = m_deqBufHistory.at(iHistoryPos); - if((int)histString.length() >= m_iBufferPos) - { - bool bad = false; - for(int i=0; i 0 ) + if (m_deqBufHistory.size()) { - int oldHistoryPos = iHistoryPos; - while( iHistoryPos != 0) + if (iHistoryPos > 0) { iHistoryPos--; - std::wstring& histString = m_deqBufHistory.at(iHistoryPos); - if((int)histString.length() >= m_iBufferPos) - { - bool bad = false; - for(int i=0; i