fix: avoid label/search-key conflicts by checking continuation#1
Conversation
|
So sorry I didn't address your PR for so long - just noticed it, for some reason I didn't receive notification about it. Will check your PR now and get back to you. |
|
Okay, went through it properly — and I also poked around your fork (https://github.com/kanlac/obsidian_flash), so I've seen the Shuangpin input mode and the refined version of this fix. Lots to like here. On the original fix: you're right that the old next-character heuristic over/under-filters in case-sensitive mode with custom alphabets, and checking real search continuation is the more correct approach (closer to flash.nvim too). The regression test nails exactly what was broken. I want this in — and I noticed The catch is timing. The plugin sat untouched for a while, then I went through community-plugin review and pushed a batch of fixes — one of them ( The mechanism is deliberately layout-agnostic: label selection already reads physical key codes, and continuation-exclusion uses the Keyboard Layout Map API with a Cyrillic fallback. On the zh-pyjj mode — I really like it, and it fits the direction perfectly. The opt-in setting, isolated So the plan I'd suggest: rebase onto current Either way — genuinely didn't expect anyone to care about this little plugin, thank you! |
Summary
Why
In some cases (especially with case-sensitive searches and custom alphabets), next-character filtering can over/under-filter label keys. Checking real search continuation matches flash.nvim behavior more closely.
Test
npm run test:unit -- FlashMatchDetector.test.ts