Commit b0df8b4
Handle zero-width characters properly in code minings
This change improves the rendering of code minings in the presence of
zero-width Unicode characters (e.g., ZWSP, ZWNJ, ZWJ, and BOM). The
`InlinedAnnotationDrawingStrategy` was updated to recognize these
characters, adjust their width calculations, and properly place code
mining annotations without causing layout issues.
This change is needed by
#14371 parent 5c0e81b commit b0df8b4
3 files changed
Lines changed: 76 additions & 6 deletions
File tree
- bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined
- tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
436 | 448 | | |
437 | 449 | | |
438 | 450 | | |
439 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
440 | 456 | | |
441 | 457 | | |
442 | 458 | | |
443 | 459 | | |
444 | 460 | | |
445 | | - | |
| 461 | + | |
446 | 462 | | |
447 | 463 | | |
448 | 464 | | |
| |||
523 | 539 | | |
524 | 540 | | |
525 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
526 | 547 | | |
527 | 548 | | |
528 | 549 | | |
| |||
539 | 560 | | |
540 | 561 | | |
541 | 562 | | |
542 | | - | |
| 563 | + | |
543 | 564 | | |
544 | 565 | | |
545 | 566 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
| 118 | + | |
117 | 119 | | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | | - | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningTest.java
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
515 | 561 | | |
516 | 562 | | |
517 | 563 | | |
| |||
0 commit comments