Correct issue with line double spacing / highlighting in Code Grid view on Windows #78
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.
I observed that on Windows systems, the highlighting is off on the code grid view due to an issue with the incorrect
.splitmethod being invoked on the source file (String). This results in a "double spacing" effect in addition to the incorrect highlighting.The actual
.splitmethod being invoked isStringLike.split, which translates into a regex[\r\n]which is then passed to the Java String.split method. The behavior of this method will cause 2 lines in the resultant array.Issue is resolved if treating as a single String (and not a Char array), which will invoke the Java
String.split(String regex)method, and correctly treat the "\r\n" as a single expression. This should work correctly on other platforms with a single character line ending (Unix and Mac).After looking at the history of this file, it seems you may have had a similar issue in the past... without knowing the history, I will let you determine the best fix :) but I have verified that this does correct the behavior I was seeing with a local snapshot build of the plugin.
FWIW I encountered this issue with Scala 2.11.4, I haven't tested the fix with 2.10. Please have a look and let me know what else needs to be done to make this a good pull?