Changeset 1317 for code/branches/console/src/core
- Timestamp:
- May 18, 2008, 1:28:08 AM (17 years ago)
- Location:
- code/branches/console/src/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/InputBuffer.cc
r1313 r1317 46 46 this->buffer_ = ""; 47 47 this->cursor_ = 0; 48 49 InputManager::getSingleton().feedInputBuffer(this); 48 50 } 49 51 … … 54 56 this->buffer_ = ""; 55 57 this->cursor_ = 0; 58 59 InputManager::getSingleton().feedInputBuffer(this); 56 60 } 57 61 -
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 -
code/branches/console/src/core/Shell.h
r1313 r1317 79 79 { return this->inputBuffer_.get(); } 80 80 81 inlinestd::list<std::string>::const_iterator getNewestLineIterator() const;82 inlinestd::list<std::string>::const_iterator getEndIterator() const;81 std::list<std::string>::const_iterator getNewestLineIterator() const; 82 std::list<std::string>::const_iterator getEndIterator() const; 83 83 84 84 void addLine(const std::string& line, unsigned int level);
Note: See TracChangeset
for help on using the changeset viewer.