@@ -63,7 +63,7 @@ void UIPanel::update(UserInterfaceComponent component,
6363 highlighted = list->cursorIndex ();
6464 }
6565 KeyboardUI::setCandidatesAsync (auxUp, preedit, caret, candidates,
66- highlighted, hasClientPreedit);
66+ highlighted, false , hasClientPreedit);
6767 break ;
6868 }
6969 case UserInterfaceComponent::StatusArea:
@@ -110,7 +110,7 @@ void UIPanel::expand(const std::string &auxUp, const std::string &preedit,
110110 int caret, bool hasClientPreedit) {
111111 auto candidates =
112112 getBulkCandidates (instance_, 0 , 72 ); // Vertically 2 screens.
113- KeyboardUI::setCandidatesAsync (auxUp, preedit, caret, candidates, 0 ,
113+ KeyboardUI::setCandidatesAsync (auxUp, preedit, caret, candidates, 0 , true ,
114114 hasClientPreedit);
115115}
116116
@@ -120,6 +120,19 @@ void UIPanel::scroll(int start, int count) {
120120 KeyboardUI::scrollAsync (candidates, endReached);
121121}
122122
123+ void UIPanel::page (bool next) {
124+ auto ic = instance_->mostRecentInputContext ();
125+ const auto &list = ic->inputPanel ().candidateList ();
126+ if (!list)
127+ return ;
128+ auto *pageableList = list->toPageable ();
129+ if (!pageableList)
130+ return ;
131+ next ? pageableList->next () : pageableList->prev ();
132+ // UI is responsible for updating UI
133+ ic->updateUserInterface (UserInterfaceComponent::InputPanel);
134+ }
135+
123136KeyboardUI::StatusAreaAction convertAction (Action *action, InputContext *ic) {
124137 auto children = swift::Array<KeyboardUI::StatusAreaAction>::init ();
125138 if (auto *menu = action->menu ()) {
@@ -165,6 +178,10 @@ void scroll(int start, int count) {
165178 dispatcher->schedule ([start, count] { fcitx::ui->scroll (start, count); });
166179}
167180
181+ void page (bool next) {
182+ dispatcher->schedule ([next] { fcitx::ui->page (next); });
183+ }
184+
168185std::string getCandidateActions (int index) {
169186 return with_fcitx ([index]() -> std::string {
170187 auto ic = instance->mostRecentInputContext ();
0 commit comments