8000 Doesn't quit visual mode after toggle comment in some cases · Issue #3123 · VsVim/VsVim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Doesn't quit visual mode after toggle comment in some cases #3123
Open
@sharpchen

Description

@sharpchen

To Reproduce

nnoremap gcc :vsc Edit.ToggleLineComment<CR>
vnoremap gc :vsc Edit.ToggleLineComment<CR><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc>

May use this code example:

internal class Person
{
    public string? Name { get; init; }
    public int Age { get; set; }
    public override string? ToString()
    {
        return default;
    }

}
  • gc
    • visual mode
      • select whole content of a line(can include leading spaces), no problem
      • select partial content of a line then toggle, will stay in visual mode after toggle
    • visual line mode
      • always stay in visual mode after toggle
  • gcc
    • locate cursor at first none-space character at a line then toggle, will stay in visual mode after toggle

Expected behavior
Quit selection after commenting.

Screenshots

Environment (please complete the following information):

  • Visual Studio version: 2022 17.11.5
  • VsVim version: 2.10.0.6
  • Programming Language: C#
  • Check(Type 'x') any that are installed:
    • ReSharper
    • Visual Assist

Note:
The following is written about contributing.
https://github.com/VsVim/VsVim/blob/master/CONTRIBUTING.md

General Keyboard configuration problems are described below.
#2527

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0