A
A
Abraham Chanski2020-12-29 04:38:19
Visual Studio Code
Abraham Chanski, 2020-12-29 04:38:19

Why does my line of code move itself in VS Code?

I am writing code in VS Code on a laptop, and this is not the first time I have somehow shifted a line of code up and down, despite the fact that I did not press Alt + key up / key down, I just scroll on the touchpad, and then I notice that a line of code has shifted somewhere, which often causes an error, and sometimes you don’t even understand, because the line that launches some function has moved to another function, as a result, when the project is launched, not a single error, and you spend hours trying to understand what is the problem here, especially if you didn’t notice it right away and after that wrote a couple more lines of code and Ctrl + z. is not a solution.
What could be the problem?

PS I don’t even accidentally press any keys, the maximum touchpad when scrolling down / up.

UPD: The problem is solved, it turns out that I swiped my finger on the touchpad when switching pages, that is, by pressing Alt + Tab, I moved the cursor to a window that was not yet opened, and thus it turned out that I accidentally wrapped the line.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Melnikov, 2020-12-29
@Letsdoit

Maybe you accidentally drag and drop text, turn it off in the settings
5feae8119cb63151745556.jpeg
(you need to uncheck it)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question