fix or debug console history
This commit is contained in:
parent
421a227d05
commit
dac9bb3899
|
@ -795,6 +795,8 @@ void QConsole::loadCommandFromHistory()
|
||||||
mCommand = mCommandHistory[mHistoryIndex];
|
mCommand = mCommandHistory[mHistoryIndex];
|
||||||
else
|
else
|
||||||
mCommand = "";
|
mCommand = "";
|
||||||
|
if (mHistoryIndex>mCommandHistory.length())
|
||||||
|
mHistoryIndex=mCommandHistory.length();
|
||||||
QString lastLine = mContents.getLastLine();
|
QString lastLine = mContents.getLastLine();
|
||||||
int len=mCurrentEditableLine.length();
|
int len=mCurrentEditableLine.length();
|
||||||
lastLine.remove(lastLine.length()-len,INT_MAX);
|
lastLine.remove(lastLine.length()-len,INT_MAX);
|
||||||
|
|
Loading…
Reference in New Issue