Skip to content

[Bug] revealCursor doesn't respect editor.cursorSurroundingLines #132123

Open

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.60.0-insider
  • OS Version: Windows 10

Steps to Reproduce:

  1. Set "editor.cursorSurroundingLines": 10 in settings.json.

  2. Add the following keybindings into keybindings.json:

    [
      {
        "key": "ctrl+up",
        "command": "-scrollLineUp",
        "when": "textInputFocus"
      },
      {
        "key": "ctrl+up",
        "command": "editorScroll",
        "when": "textInputFocus",
        "args": {
          "to": "up",
          "value": 10,
          "by": "line",
          "revealCursor": true
        }
      },
      {
        "key": "ctrl+down",
        "command": "-scrollLineDown",
        "when": "textInputFocus"
      },
      {
        "key": "ctrl+down",
        "command": "editorScroll",
        "when": "textInputFocus",
        "args": {
          "to": "down",
          "value": 10,
          "by": "line",
          "revealCursor": true
        }
      }
    ]
  3. Use Ctrl+Up or Ctrl+Down across pages in a long file.

  4. The cursor position may appear at the top or at the bottom in the process, editor.cursorSurroundingLines is not respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-commandsEditor text manipulation commandshelp wantedIssues identified as good community contribution opportunities

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions