ymotongpoo / vsc-licenser

License handler extension for Visual Studio Code.
Apache License 2.0
45 stars 40 forks source link

licenser causes immediately closing of file when opening non-existent file #126

Open jmhodges opened 2 years ago

jmhodges commented 2 years ago

Runtime environment

Behaviors

Expected behavior

Running code foo.txt when foo.txt doesn't exist should open a tab in vscode, insert the license, and leave the tab open.

Actual behavior

Running code foo.txt when foo.txt doesn't exist opens the tab, inserts the license into the buffer, then closes the tab immediately after.

Steps to reproduce the issue

  1. Run code foo.txt from the command line with foo.txt not existing
  2. Observe the tab opens for a second, there's some license text and then see the tab for the file immediately close
  3. (Disabling the licenser extensions causes this bug to not occur)