Skip to content

Show the candidate page number (PgUp 1/17 PgDn) in the candidate window - #927

Open
DaveTseng2019 wants to merge 4 commits into
EasyIME:masterfrom
DaveTseng2019:feat/candidate-page-indicator
Open

DaveTseng2019 wants to merge 4 commits into
EasyIME:masterfrom
DaveTseng2019:feat/candidate-page-indicator

Conversation

@DaveTseng2019

@DaveTseng2019 DaveTseng2019 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The candidate window only shows the current page and gives no hint that more pages exist. In 新酷音 with 9 candidates per page, 幣 (ㄅㄧˋ) is on page 2 of 17, so it looks like it cannot be typed. With this PR the window shows PgUp 1/17 PgDn in grey at the bottom right when there is more than one page.

Depends on EasyIME/libIME2#6. Merge that first; until then the submodule commit is only in the fork DaveTseng2019/libIME2. The submodule points to libIME2#6 on top of 78e6104, the libIME2 commit master uses today, so this PR does not pull in other libIME2 changes.

  • Update libIME2 to the commit that adds CandidateWindow::setPageInfo().
  • PIMETextService: read optional candidatePage (1-based) and candidatePageCount that come with candidateList, and pass them to the window. A list without them resets the page to 0/0, so other backends keep today's window and an old page number never sticks.
  • python: setCandidateList(cand, page=0, pageCount=0); when pageCount > 1 the reply carries the two fields. Existing callers are unchanged.
  • chewing: send cand_CurrentPage() + 1 and cand_TotalPage() with the list.

Rebased on current master to resolve the libIME2 submodule conflict; the code changes are the same as before.

Testing: built x86/x64 PIMETextService.dll and the installer, installed on Windows 11 x64, and checked with 新酷音 that ㄅㄧˋ then ↓ shows 1/17, PageDown shows 2/17 with 幣 on it, and a one-page list shows no page line. No unit test: the TSF window and the IPC fields have no test harness yet.

Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

@PCMan PCMan closed this Oct 16, 2026
@PCMan PCMan reopened this Oct 16, 2026
@PCMan

PCMan commented Oct 17, 2026

Copy link
Copy Markdown
Member

Hi @DaveTseng2019, thank you for your contribution!

Currently, I am focused on resolving several critical stability and IPC issues in the core framework. Because of this, pull requests introducing new features are temporarily on hold and will be reviewed once the stability fixes are complete. Thank you for your patience and understanding!


感謝你的貢獻與 PR!

目前我正專注於修復核心架構與各項穩定性問題(Bug fixes),因此新功能的 PR 會在穩定性問題解決告一段落後再陸續進行審核,感謝你的耐心與體諒!

DaveTseng2019 and others added 4 commits October 30, 2026 13:15
The next commit passes the candidate page from the backend to the
window, which needs this API.

- Move the libIME2 submodule to the commit that adds
  CandidateWindow::setPageInfo().

Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backends page their candidates, but the window only gets the current
page, so users cannot see that more candidates exist.

- Read optional "candidatePage" (1-based) and "candidatePageCount"
  that come with "candidateList", and hand them to the candidate
  window through TextService::setCandidatePage().
- A list without them resets the page to 0/0, so backends that do not
  send it keep today's window, and an old page number never sticks.

Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lets a Python input method tell the candidate window which page it
shows and how many pages there are.

- setCandidateList(cand, page=0, pageCount=0). When pageCount > 1 the
  reply also carries "candidatePage" and "candidatePageCount".
- Existing callers are unchanged and send no page.

Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With 9 candidates per page, 幣 (ㄅㄧˋ) is on page 2 of 17, but the
window gave no hint that more pages exist, so it looked missing.

- Pass libchewing's cand_CurrentPage() + 1 and cand_TotalPage() with
  the candidate list.

Architecture and design by Dave Tseng. Implementation generated with AI assistance from Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants