ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

Externally Modified File Falsely Reports Wrongly Typed Text

Open 7enderhead opened this issue 2 years ago • 2 comments

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' 2023-03-07 Ionide not synced 1

  • here, I also added the module name; this time, the module name gets mixed up (supposedly with a letter from the function?) 2023-03-07 Ionide not synced 2

  • 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 2023-03-07 Ionide reload

Machine info

  • OS: Linux Mint 20.03
  • .NET SDK version: 7.0.102
  • Ionide version: 7.5.1 on VS Code 1.76.0

7enderhead avatar Mar 07 '23 21:03 7enderhead

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 )

chrisfls avatar Mar 08 '23 22:03 chrisfls

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.

7enderhead avatar Mar 09 '23 19:03 7enderhead