[3889] Fix long lines with power operator(s) getting splitted before line length#3942
[3889] Fix long lines with power operator(s) getting splitted before line length#3942JelleZijlstra merged 9 commits intopsf:mainfrom
Conversation
|
diff-shades results comparing this PR (ba2cc11) to main (6f84f65). The full diff is available in the logs under the "Generate HTML diff report" step. |
These all seem to be cases of erroneous line splitting getting fixed. |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks. This looks correct, but we'll have to make the change in the preview style only for now.
Ok, will do. Does this mean that the tests should also be reverted, as they will fail after the fix is behind |
|
You can add |
Description
Hugging power operators had a bug, where operators that end up hugging were still counted as not hugging when deciding to split the line. The bug is described here. The whole issue is a bit circular as we need to know the line length before we start to apply transformations. Calculating the hugging of power operators at the beginning of
transform_lineseems to do the trick. Ideally thehug_power_optransform would be done only once, but switching the order of transforms broke a lot of other places, so I don't know if there's any other good options here.Checklist - did you ...
CHANGES.mdif necessary?