#include "GuiCommandEdit.h"
#include "GuiView.h"
#include "qt_helpers.h"
+#include "Validator.h"
#include "BufferView.h"
#include "Cursor.h"
edit_ = new GuiCommandEdit(this);
edit_->setMinimumSize(edit_->sizeHint());
edit_->setFocusPolicy(Qt::ClickFocus);
+ edit_->setValidator(new NoNewLineValidator(edit_));
connect(edit_, SIGNAL(escapePressed()), this, SLOT(cancel()));
connect(edit_, SIGNAL(returnPressed()), this, SLOT(dispatch()));
{
vector<string> comp;
- copy_if(commands_.begin(), commands_.end(),
+ lyx::copy_if(commands_.begin(), commands_.end(),
back_inserter(comp), prefix_p(prefix));
if (comp.empty()) {
test += tmp[test.length()];
while (test.length() < tmp.length()) {
vector<string> vtmp;
- copy_if(comp.begin(), comp.end(),
+ lyx::copy_if(comp.begin(), comp.end(),
back_inserter(vtmp), prefix_p(test));
if (vtmp.size() != comp.size()) {
test.erase(test.length() - 1);
upPB->setEnabled(history_pos_ != history_.begin());
downPB->setEnabled(history_pos_ != history_.end());
FuncRequest func = lyxaction.lookupFunc(str);
- func.origin_ = FuncRequest::COMMANDBUFFER;
+ func.setOrigin(FuncRequest::COMMANDBUFFER);
lyx::dispatch(func);
}