Commit e8b4ecb
committed
Don't special-case user_value for choice symbols set to y
Previously, setting a choice symbol to y would only update
user_selection on the parent choice and not the symbol's own user_value.
Now both are updated.
The point of the old behavior was to remember the m mode selections of a
choice when it was switched back and forth between m and y mode, which
was a feature I thought the C implementation had. On closer inspection,
the C implementation never had that feature, though it might appear like
it if you only make "lucky" changes (if you never select any symbols in
y mode that were n in m mode).
The new behavior is simpler and easier to understand: Symbol.user_value
now always matches the value assigned in a .config file or via
set_value(), provided the value was well-formed. This might avoid some
special-casing in scripts too.
The loss in usability is pretty minimal.1 parent 2abc0bb commit e8b4ecb
2 files changed
Lines changed: 29 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2700 | 2700 | | |
2701 | 2701 | | |
2702 | 2702 | | |
2703 | | - | |
2704 | | - | |
2705 | | - | |
| 2703 | + | |
| 2704 | + | |
2706 | 2705 | | |
2707 | 2706 | | |
2708 | 2707 | | |
| |||
2727 | 2726 | | |
2728 | 2727 | | |
2729 | 2728 | | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
2733 | 2737 | | |
2734 | 2738 | | |
2735 | 2739 | | |
| |||
2763 | 2767 | | |
2764 | 2768 | | |
2765 | 2769 | | |
| 2770 | + | |
| 2771 | + | |
2766 | 2772 | | |
2767 | | - | |
2768 | | - | |
2769 | | - | |
2770 | | - | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
2771 | 2777 | | |
2772 | 2778 | | |
2773 | 2779 | | |
2774 | 2780 | | |
2775 | | - | |
2776 | 2781 | | |
2777 | 2782 | | |
2778 | 2783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1550 | 1550 | | |
1551 | 1551 | | |
1552 | 1552 | | |
1553 | | - | |
| 1553 | + | |
1554 | 1554 | | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
| 1555 | + | |
| 1556 | + | |
1559 | 1557 | | |
1560 | 1558 | | |
1561 | 1559 | | |
| |||
1628 | 1626 | | |
1629 | 1627 | | |
1630 | 1628 | | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
1631 | 1635 | | |
1632 | 1636 | | |
| 1637 | + | |
| 1638 | + | |
1633 | 1639 | | |
1634 | | - | |
1635 | | - | |
1636 | | - | |
| 1640 | + | |
1637 | 1641 | | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | 1642 | | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
| 1643 | + | |
1653 | 1644 | | |
1654 | 1645 | | |
1655 | 1646 | | |
| |||
0 commit comments