Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Jonathan,
Currently if a zero-width escape sequence in a
Screen
changes, but theChar
at the same position does not change, the new ZWE is not sent to the output. I think the expected behaviour is that all changes to ZWEs should be sent to the output.I've read the warning about this being performance-critical code, and obviously checking for differences in ZWEs in addition to differences in the data buffer will take longer. However, by avoiding unnecessary calls to
move_cursor
if the cursor is already in the correct position, we can save a bit of time to make up for this.My testing shows that this implementation is not significantly slower than the current implementation (and can be faster in some scenarios) - but I'd appreciate if someone could test it independently.
Let me know what you think,
Josiah