Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing no-change message in -ie mode #135

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anordal
Copy link
Contributor

@anordal anordal commented Jul 28, 2023

This warning is nice to see, but only worked in -i and -e mode, not in -ie mode:

(warning) no changes performed

The Step.message was initialized to None instead of the old value,
causing unedited messages in message-edit mode to compare unequal.

This commit removes the optionality and thereby the possibility for the problem.
It can also be solved by interpreting None as the old value
or resetting the new value to None if it is indifferent.

@anordal anordal force-pushed the fix-missing-nochange-msg-in-msgedit-mode branch 2 times, most recently from e4660b0 to 015b93b Compare July 28, 2023 11:48
Using an out-argument because it is (to my knowledge) not possible
to get at the value returned from a contextmanager function.
This warning is nice to see,
but only worked in `-i` and `-e` mode, not in `-ie` mode:

    (warning) no changes performed

The Step.message was initialized to None instead of the old value,
causing unedited messages in message-edit mode to compare unequal.

This commit removes the optionality and thereby the possibility
for the problem.
It can also be solved by interpreting None as the old value
or resetting the new value to None if it is indifferent.
@anordal anordal force-pushed the fix-missing-nochange-msg-in-msgedit-mode branch from 015b93b to baf5d75 Compare August 1, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant