首页 > 解决方案 > Visual Studio Code automatically removes the latest empty lines when I'm changing windows/tabs. How to fix this?

问题描述

For example the code is this:

void main() {
  String msg = "Hi";

  Function say = () {
    msg = "Hello";
    print(msg);
  };
  
  
}

Every time I change tabs and come back to VSCode, the code would end up looking like this

void main() {
  String msg = "Hi";

  Function say = () {
    msg = "Hello";
    print(msg);
  };
}

As you can see, it automatically deleted the empty line that I wanted to use after researching stuff on the other windows. Is there any VSCode setting to change this?

标签: visual-studio-code

解决方案


推荐阅读