-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto import inserts import into a comment #20293
Comments
This is related to crlf line enedings. Here's the code action we get back for a crlf file:
With lf line endings, we instead get:
|
From #20292 (comment) import { read } from "fs";
#!/usr/bin/env node |
I'm not reproducing this with |
The case that was quoted in #20293 (comment) appeared on my workstation. That happened on Windows in a file with LF. |
I could swear that @amcasey mentioned noticing this (or something very like it) before and having a fix for it; Am I wrong? |
I'm unable to reproduce either error (the original or the shebang one which should have been fixed by #20306) on windows in either an LF or CRLF file. |
From @yume-chan on November 22, 2017 2:8
Steps to Reproduce:
npm i @types/node
index.js
/// <reference types="node" />
setTimeout
, select the auto import suggest.Expected Result:
Actual Result:
Copied from original issue: microsoft/vscode#38914
The text was updated successfully, but these errors were encountered: