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 會在穩定性問題解決告一段落後再陸續進行審核,感謝你的耐心與體諒!

@PCMan

PCMan commented Nov 6, 2026

Copy link
Copy Markdown
Member

The showPageNumber implementation in PIMETextService and python/textService.py looks clean! Note that this PR updates the libIME2 submodule pointer (f249c2ff), so EasyIME/libIME2#6 will need to be merged first (and the submodule pointer updated if the merge SHA changes) before this PR can be merged into master.

(Review comment generated on behalf of @PCMan with AI assistance from Google Antigravity + Gemini 3.1 Pro)

@PCMan

PCMan commented Nov 13, 2026

Copy link
Copy Markdown
Member

I'll withhold all new features for now. Let's finalize v2.0 first to get the framework to a stable and robust state. Then we start adding new features on top of v2.0.

(Review comment generated with assistance from Antigravity + Gemini 4 Argon)

@asdf80730

Copy link
Copy Markdown
Contributor

兩個 PR 都停在舊 master 上,需要 rebase 到目前的 master(0e270f21)才會轉綠。

This head still sits on the pre-#1047 master; a rebase onto the current master (0e270f21) is what it needs.

@asdf80730

Copy link
Copy Markdown
Contributor

REBASE NOTES

Rebase notes (2026-11-21, omp)

Base: upstream/master at 0e270f21. The only conflict is the libIME2 gitlink.

  • git fetch upstream && git rebase upstream/master
  • Take the base side for the submodule: git update-index --cacheinfo 160000,70d41ec0a901df1b4f470683d801ff84e50a8016,libIME2 then git rebase --continue.
  • 70d41ec0 is the pin that carries the 在Word操作排版當機 #883 Word crash fixes and the window-owned HFONT, so no further libIME2 bump is needed here.

DaveTseng2019 and others added 4 commits November 21, 2026 14:13
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>
@DaveTseng2019
DaveTseng2019 force-pushed the feat/candidate-page-indicator branch from 25ea8e8 to 64daa60 Compare November 21, 2026 06:23
@DaveTseng2019

Copy link
Copy Markdown
Contributor Author

Rebased onto current master (c890175). Thanks for the rebase notes.

One difference from the notes: the libIME2 gitlink does not take the base side (70d41ec). This PR needs the candidate-window half of the feature, which is in EasyIME/libIME2#6, so the gitlink points to 88cea17: libIME2#6 rebased onto libIME2 master.

  • 88cea17 vs 70d41ec: only src/CandidateWindow.cpp and src/CandidateWindow.h (the page number), plus comment-only lines in src/TextService.cpp (libIME2 master vs 70d41ec). The 在Word操作排版當機 #883 Word crash fixes and the window-owned HFONT are kept.
  • PIME side: no conflict besides the gitlink. git diff master touches only this PR's 6 files.
  • My local integration branch (current master plus this feature and my other open PRs) builds, ctest 5/5, and typing with Chewing works (page number and Shift switching). That is not this exact head; CI on this PR covers the exact head.

As before, libIME2#6 has to be merged first, and the gitlink updated if its merge SHA differs.


已 rebase 到目前的 master(c890175)。libIME2 gitlink 沒有取 70d41ec:本 PR 需要 libIME2#6 的選字視窗頁碼,所以指向 88cea17(libIME2#6 rebase 到 libIME2 master)。它和 70d41ec 只差頁碼的兩個檔,加上 TextService.cpp 的註解;#883 的修正都在。

@DaveTseng2019

Copy link
Copy Markdown
Contributor Author

分支已經 rebase 到目前的 master(c890175f),CI 已轉綠。libIME2 子模組要留在 88cea179,不能改成 70d41ec0。

The branch is already rebased onto the current master (c890175f, newer than 0e270f21), and both CI checks pass.

Please keep the libIME2 gitlink at 88cea179 rather than taking the base side (70d41ec0):

(Comment generated with assistance from Claude Code + Claude Opus 5.5)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants