ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
Externally Modified File Falsely Reports Wrongly Typed Text
Describe the bug
- F# file opened in Ionide which is modified externally mixes up character positions after reload/update.
Steps to reproduce
- F# file open in Ionide
- manipulate file externally
- in my case this is done by a literate programming tool
- try to edit the (auto-)reloaded file (which displays the external changes correctly)
- the displayed text does not seem to be synchronized with the buffer contents which are used for compiling/generating hints&errors
- typing text which displays correct code shows syntax errors because of 'mistyped' text (see screenshots)
- closing and reopening the files makes this weird errors go away without any additional changes (file has not been changed externally since then, see screenshot)
Expected behaviour
- the displayed text and the buffer contents for compiling / producing error hints are synchronized
Screenshots
-
here, I added the module name in front of the function name; obviously, the function's first letter is 'swallowed'

-
here, I also added the module name; this time, the module name gets mixed up (supposedly with a letter from the function?)

-
all typing was done by placing the cursor in front of the function name and typing the module name without any extra cursor movement or commands etc
-
the same file after closing and reopening; nothing was changed in the file, but Ionide now (correctly) reports no problems

Machine info
- OS: Linux Mint 20.03
- .NET SDK version: 7.0.102
- Ionide version: 7.5.1 on VS Code 1.76.0
Here it's happening even if I don't edit the file externally, I'm having to reload vscode all the time (if we had an option to just restart the server...) (my issue looks more like https://github.com/ionide/ionide-vscode-fsharp/issues/1835 )
Here it's happening even if I don't edit the file externally, I'm having to reload vscode all the time (if we had an option to just restart the server...) (my issue looks more like #1835 )
Yes, this very much looks like the behavior in #1835.