Skip to content

Commit

Permalink
Use the OS-specific newline when passing code to FSI (2)
Browse files Browse the repository at this point in the history
Use `has('win32')` to counter the case where a Windows user is editing
UNIX text files
  • Loading branch information
cannorin committed Nov 3, 2024
1 parent a0cf898 commit a9eda69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions autoload/fsharp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ function! s:prompt(msg)
endfunction

function! s:get_newline()
if &fileformat == 'dos'
if has('win32') || &fileformat == 'dos'
return "\r\n"
elseif &fileformat == 'mac'
return "\r"
else
return "\n"
endif
Expand Down

0 comments on commit a9eda69

Please sign in to comment.