mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
reformat
This commit is contained in:
parent
51f81262d5
commit
b25da12e9b
1 changed files with 6 additions and 11 deletions
|
@ -60,25 +60,20 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
|
|||
c->sendMessage(textInput.toPlainText());
|
||||
prevMsg.append(textInput.toPlainText());
|
||||
event->accept();
|
||||
if(!(event->modifiers() == Qt::ControlModifier))
|
||||
{
|
||||
if (!(event->modifiers() == Qt::ControlModifier)) {
|
||||
textInput.setText(QString());
|
||||
prevIndex = 0;
|
||||
}
|
||||
else if(textInput.toPlainText() == prevMsg.at(prevMsg.size()-1))
|
||||
{
|
||||
} else if (textInput.toPlainText() == prevMsg.at(prevMsg.size() - 1)) {
|
||||
prevMsg.removeLast();
|
||||
}
|
||||
prevIndex = prevMsg.size();
|
||||
}
|
||||
else if(event->key() == Qt::Key_Up){
|
||||
if(prevMsg.size() && prevIndex){
|
||||
} else if (event->key() == Qt::Key_Up) {
|
||||
if (prevMsg.size() && prevIndex) {
|
||||
prevIndex--;
|
||||
textInput.setText(prevMsg.at(prevIndex));
|
||||
}
|
||||
}
|
||||
else if(event->key() == Qt::Key_Down){
|
||||
if(prevIndex != (prevMsg.size() - 1) && prevIndex != prevMsg.size()){
|
||||
} else if (event->key() == Qt::Key_Down) {
|
||||
if (prevIndex != (prevMsg.size() - 1) && prevIndex != prevMsg.size()) {
|
||||
prevIndex++;
|
||||
textInput.setText(prevMsg.at(prevIndex));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue