mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
Fix enter when no completion available
This commit is contained in:
parent
bc93f24a22
commit
0eb8d4126b
1 changed files with 13 additions and 12 deletions
|
@ -117,15 +117,20 @@ Rectangle {
|
||||||
popup.completerName = "";
|
popup.completerName = "";
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
popup.close();
|
popup.close();
|
||||||
} else if (event.matches(StandardKey.InsertParagraphSeparator) && popup.opened) {
|
} else if (event.matches(StandardKey.InsertParagraphSeparator)) {
|
||||||
var currentCompletion = popup.currentCompletion();
|
if (popup.opened) {
|
||||||
popup.completerName = "";
|
var currentCompletion = popup.currentCompletion();
|
||||||
popup.close();
|
popup.completerName = "";
|
||||||
if (currentCompletion) {
|
popup.close();
|
||||||
textArea.insertCompletion(currentCompletion);
|
if (currentCompletion) {
|
||||||
event.accepted = true;
|
textArea.insertCompletion(currentCompletion);
|
||||||
return ;
|
event.accepted = true;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
TimelineManager.timeline.input.send();
|
||||||
|
textArea.clear();
|
||||||
|
event.accepted = true;
|
||||||
} else if (event.key == Qt.Key_Tab && popup.opened) {
|
} else if (event.key == Qt.Key_Tab && popup.opened) {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
popup.down();
|
popup.down();
|
||||||
|
@ -135,10 +140,6 @@ Rectangle {
|
||||||
} else if (event.key == Qt.Key_Down && popup.opened) {
|
} else if (event.key == Qt.Key_Down && popup.opened) {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
popup.down();
|
popup.down();
|
||||||
} else if (event.matches(StandardKey.InsertParagraphSeparator)) {
|
|
||||||
TimelineManager.timeline.input.send();
|
|
||||||
textArea.clear();
|
|
||||||
event.accepted = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue