Bug 25117 - The XS Editor does correctly handle backslash in source
Summary: The XS Editor does correctly handle backslash in source
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: F# Add-in ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Dave Thomas
URL:
Depends on:
Blocks:
 
Reported: 2014-12-05 14:59 UTC by fwaris
Modified: 2015-01-14 11:01 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro (1.63 MB, application/zip)
2014-12-05 16:13 UTC, David Hathaway
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description fwaris 2014-12-05 14:59:10 UTC
The backslash character is problematic in F# source files in Xamarin Studio.

If you accidentally type backslash, it gets hidden and then remains hidden in the source file.

When you then compile the source, the compiler complains about the backslash.

Also the code formatting goes awry if there is backslash in a literal string.

For example any code after the following line is not syntax highlighted correctly:

  let h_vt  = ",\"vt\":\""     


This happens on both the PC and the Mac.
Comment 1 David Hathaway 2014-12-05 16:12:37 UTC
Confirmed - see attached reproduction.

| CSharpSample
| - CSharpSampleViewController.cs <- Line  36, I'm able to include \ characters

| FSharpSample
| - FSharpSampleViewController.fs <-  Line 15, can't include \ characters

If you open the source code for FSharpSampleViewController.fs in a text editor, you'll see the following:

http://screencast.com/t/bRnnvyLf5

When you open it in Xamarin Studio, you see:

http://screencast.com/t/phvc9Ridu
Comment 2 David Hathaway 2014-12-05 16:13:14 UTC
Created attachment 8984 [details]
Repro
Comment 3 Dave Thomas 2014-12-09 07:50:15 UTC
This is an issue with semantic highlighting, until this is fixed you can turn it off in the menu:

Xamarin Studio | Preferences | Text Editor | Syntax Highlighting

uncheck "Enable Semantic Highlighting"
Comment 4 fwaris 2014-12-09 09:08:35 UTC
Thanks.

Unchecking "Enable Semantic Highlighting" fixed the issue
Comment 5 Dave Thomas 2015-01-14 11:01:16 UTC
Fixed in fsharpbinding master