prefix_ std::string::size_type senf::console::Client::handleInput(std::string data,
bool incremental)
{
- if (data.empty() && ! incremental) {
- data = lastCommand_;
- stream() << "repeat: " << data << std::endl;
- } else
- lastCommand_ = data;
-
std::string::size_type n (data.size());
try {
reader_->enablePrompt();
}
+prefix_ unsigned senf::console::Client::getWidth(std::ostream & os, unsigned defaultWidth,
+ unsigned minWidth)
+{
+ unsigned rv (defaultWidth);
+ try {
+ rv = get(os).width();
+ }
+ catch (std::bad_cast &) {}
+ return rv < minWidth ? defaultWidth : rv;
+}
+
///////////////////////////////////////////////////////////////////////////
// senf::console::Client::SysBacktrace