You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix IDE formatting of correctly formatted files with trailing newlines (#9683)
Summary:
Since D60978552, we special-case removing a range of lines during IDE formatting so that T188437747 does not rear its ugly head. However, when document-formatting a file that is already correctly formatted save for some spurious trailing newlines, this logic ends up consuming the last non-newline line. So, only shift the start offset if the last changed line wasn't a trailing line that got removed.
Add a test and wire up `hh_single_ide_format` with the OSS dune build so that IDE format tests can be run.
Pull Request resolved: #9683
Reviewed By: mheiber
Differential Revision: D88329959
fbshipit-source-id: 4a238f20e446395cbf79e1b45ed8bd9b53623fdf
0 commit comments