-
Notifications
You must be signed in to change notification settings - Fork 24
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 windows line endings #109
Conversation
I do not have access to a Windows machine to test. Is someone else able to check that the unit tests now pass in Windows? |
@garyttierney, this was exposed on a PR you posted up - if you have time, could you give the unit tests a check? |
Hey @ZNielsen, sorry, missed this notification. I'll check it later today. |
No worries, open source happens on its own timeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hm, the minimap does seem to work correctly (the highlighted region looks good for beginning, middle, and end of a 100 KiB file) in my editor, but the tests are still failing:
|
A couple places assumed unix line endings, but the Search function/unit tests heavily relied on it. This commit detects the platform and changes the used line endings accordingly.
6d526ac
to
5959f68
Compare
I tried the changes in Windows (plus the new unit test file) and only one unit test does not pass: ✗ Search - History
Vim(let):E866: (NFA regexp) Misplaced @
<SNR>80_minimap_test_search_history:10 It can be fixed by commenting out the changes in the function, let split_char = '\n'
" if has('win32')
" let split_char = '\r\n'
" endif
let lines = split(git_diff, split_char) This is the one change with notable problems. For example, it also broke git coloring. This is a screenshot of a If I re-enable those specific changes, the highlighting breaks. However, I also tried disabling the other line ending changes, and I didn't see any improvement upon making the changes from Despite Since the problem discussed in the PR was solved by using the Vimscript function Apologies for my long absence from this PR. If someone else with a Windows machine has a different experience, please follow up! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Check list
Description
A couple places assumed unix line endings, but the Search function/unit
tests heavily relied on it. This commit detects the platform and changes
the used line endings accordingly.
Fixes #101
Type of change
Test environment