Commit a26c13a
committed
feat: Add context-aware cursor rendering for Latin vs Arabic text
Implements Phase 3 of the dual-cursor system architecture.
This modifies the cursor rendering to detect script type and apply
appropriate visual treatment:
- Latin/non-connected scripts (focused): Opaque text with solid background
(restores standard Vim block cursor behavior)
- Arabic/connected scripts (focused): Transparent text with solid background
(preserves visual character connections in RTL)
- Any script (unfocused): Transparent text with outline only
Changes:
- Import detectScriptTypeWithContext() from script-detection module
- Add script detection and focus state checking in measureCursor()
- Set partial parameter based on script type and focus state
This addresses maintainer feedback on #248 about
restoring standard Vim cursor behavior for Latin text while maintaining
special handling for Arabic connected characters.
Performance: Adds single O(1) script detection per cursor render.
Tested: ✅ Latin letters show white text in cursor (opaque)
Tested: ✅ Arabic letters are invisible in cursor (transparent)1 parent 1b68e0a commit a26c13a
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
274 | 287 | | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
278 | | - | |
| 291 | + | |
279 | 292 | | |
280 | 293 | | |
281 | 294 | | |
| |||
0 commit comments