Changeset 1317 for code/branches/console/src/core/Shell.cc
- Timestamp:
- May 18, 2008, 1:28:08 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/Shell.cc
r1313 r1317 48 48 49 49 this->clearLines(); 50 50 /* 51 51 this->inputBuffer_.registerListener(this, &Shell::inputChanged, true); 52 52 this->inputBuffer_.registerListener(this, &Shell::execute, '\r', false); … … 63 63 this->inputBuffer_.registerListener(this, &Shell::scroll_up, OIS::KC_PGUP); 64 64 this->inputBuffer_.registerListener(this, &Shell::scroll_down, OIS::KC_PGDOWN); 65 65 */ 66 66 this->setConfigValues(); 67 67 } … … 141 141 { 142 142 if (this->scrollPosition_) 143 { 143 144 return this->scrollIterator_; 145 } 144 146 else 145 return this->lines_.begin(); 147 { 148 if ((*this->lines_.begin()) == "" && this->lines_.size() > 1) 149 return (++this->lines_.begin()); 150 else 151 return this->lines_.begin(); 152 } 146 153 } 147 154 … … 169 176 while (this->outputBuffer_.getLine(&output)) 170 177 { 178 bool newline = false; 179 if ((*this->lines_.begin()) == "") 180 newline = true; 181 171 182 (*this->lines_.begin()) += output; 183 184 SHELL_UPDATE_LISTENERS(onlyLastLineChanged); 185 172 186 this->lines_.insert(this->lines_.begin(), ""); 173 187 … … 177 191 this->scrollIterator_ = this->lines_.begin(); 178 192 179 SHELL_UPDATE_LISTENERS(linesChanged); 180 SHELL_UPDATE_LISTENERS(lineAdded); 193 if (newline) 194 { 195 SHELL_UPDATE_LISTENERS(lineAdded); 196 } 181 197 } 182 198
Note: See TracChangeset
for help on using the changeset viewer.