Commit 185c2c1
committed
fix(formatting): resolve ANSI text effects into actual effects
The API change in cursive-core 0.4.0 included the addition of EffectStatus,
which was intended to allow composite or additive effects, as well as exclusive
effects. The recent update to misapplied this new API and ignored the status,
effectively applying all styles, all the time. This change instead resolves the
incoming styles against an "empty" style, yielding only the styles that should
be applied. As far as I am aware, we don't do any compositing with cursive
styles, so this should yield same results as we had with cursive 0.3.
Moreover, because we're once again only iterating on the actual effects we need
to apply, we can also restore the `bail!()` that was unnecessarily removed
durint the upgrade.
Closes #1642
Ref: ed946a9
Ref: f6a7008
Ref: gyscos/cursive@ea2e0be1 parent b9e7e3a commit 185c2c1
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
0 commit comments