What does the red square in vs code source control mean?

Viewed 662

I've noticed while looking over the differences in vs codes source control that there will be random red squares. I can see the red lines/blocks and green lines/blocks easy. But I have no clue what these red squares mean and I don't see them in the code. Anybody know what those are for?

Tried googling around and all I saw was people asking about the red debug dot which is different.

enter image description here

1 Answers

They indicate the scroll position of errors/warnings.

The lighter section on the right is a sort of scroll bar, and the whole vertical section there represents the whole document:

enter image description here

As you can see, in the currently highlighted section - which represents the current section of the code visible in the viewport - there is a red dot just a bit above the middle. This corresponds to the error visible just above the middle of the viewport - the red squiggle below the (req, res, next) => part.

You can see another two red dots a bit below the currently highlighted section. That means that if you scroll down one page, the next page will show two errors.

And so on. I see 6 dots, which means that there are at least 6 lines in the whole document that VSCode has detected have errors on them. Scroll to them using the red squares to see what they are.

Related