mirror of https://github.com/stella-emu/stella.git
add commands from 'exec' script to prompt history
This commit is contained in:
parent
0049a968bb
commit
b1f841cccc
|
@ -1177,9 +1177,16 @@ void DebuggerParser::executeExec()
|
|||
<< uInt32(TimerManager::getTicks()/1000);
|
||||
execPrefix = prefix.str();
|
||||
}
|
||||
|
||||
// make sure the commands are added to prompt history
|
||||
StringList history;
|
||||
|
||||
++execDepth;
|
||||
commandResult << exec(node);
|
||||
commandResult << exec(node, &history);
|
||||
--execDepth;
|
||||
|
||||
for(const auto& item : history)
|
||||
debugger.prompt().addToHistory(item.c_str());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -784,7 +784,6 @@ void PromptWidget::nextLine()
|
|||
updateScrollBuffer();
|
||||
}
|
||||
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Call this (at least) when the current line changes or when a new line is added
|
||||
void PromptWidget::updateScrollBuffer()
|
||||
|
|
|
@ -51,6 +51,8 @@ class PromptWidget : public Widget, public CommandSender
|
|||
// Clear screen and erase all history
|
||||
void clearScreen();
|
||||
|
||||
void addToHistory(const char *str);
|
||||
|
||||
protected:
|
||||
int& buffer(int idx) { return _buffer[idx % kBufferSize]; }
|
||||
|
||||
|
@ -75,7 +77,6 @@ class PromptWidget : public Widget, public CommandSender
|
|||
void textPaste();
|
||||
|
||||
// History
|
||||
void addToHistory(const char *str);
|
||||
void historyScroll(int direction);
|
||||
|
||||
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
|
||||
|
|
Loading…
Reference in New Issue