Adil Mammadov
Adil Mammadov

Reputation: 8696

Cursors stays where I click in VS text editor

Sorry for question but I can't find answer anywhere on internet. I couldn't find answer myself either. Here is question:

Previously when I clicked anywhere in VS text editor cursor moved to the end of statement, just after ";". But now it stays where I click on the screen and it is really annoying. How can I address this issue. Thanks in advance.

Upvotes: 17

Views: 3646

Answers (2)

Ashraf Sada
Ashraf Sada

Reputation: 4905

In Visual Studio 2019, you must check the Tools - Options -Text Editor - All Languages - Scroll Bars then check the Show caret position option.

enter image description here

Upvotes: 0

Sir Crispalot
Sir Crispalot

Reputation: 4854

This is called Virtual Space and can be changed in Visual Studio's options dialog.

As per the MSDN article:

To position comments beside your code

  • In the Options dialog box, expand Text Editor, and then click the General node for your development language.

  • Under Settings, select Enable virtual space.

When this option is selected and Word wrap is cleared, you can click anywhere beyond the end of a line in the Code Editor and type.

To revert to the behaviour you're after, you need to uncheck Enable virtual space either at the language level or for all languages:

Visual Studio options dialog showing unchecked virtual space setting

Also more here.

Upvotes: 43

Related Questions