-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
29 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters