| 190 | } |
| 191 | |
| 192 | boost::optional<const ConsoleInterface::String_t&> ConsoleInterface::scrollCommandHistoryPositionUp(const ConsoleInterface::String_t& currentPrompt) |
| 193 | { |
| 194 | //If the list is empty, or we are at the top, return none |
| 195 | if(mCommandHistoryBuffer.empty() || mHistoryPos == mCommandHistoryBuffer.begin()) |
| 196 | { |
| 197 | return boost::none; |
| 198 | } |
| 199 | else |
| 200 | { |
| 201 | if(!isInHistory()) |
| 202 | { |
| 203 | mTemporaryCommandString = currentPrompt; |
| 204 | } |
| 205 | --mHistoryPos; |
| 206 | return boost::optional<const String_t&>(*mHistoryPos); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | boost::optional<const ConsoleInterface::String_t&> ConsoleInterface::scrollCommandHistoryPositionDown() |
| 211 | { |
no outgoing calls