redhat-developer / redhat-developer/vscode-java

Next line cursor when we have multiple line statement is not acting correctly.

Open
#2,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content-assist ux
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

At the end of a statement (i.e. ends with ";") the new cursor does not go to the beginning of the line but align with the previous line. I attached a screenshot to demonstrate the issue.

Screenshot 2021-09-05 at 19 20 03

When I "enter" to go the the next line, the new cursor start at the column of ".blocki...". It should be the beginning of the line which is the column "web3...." instead.

Environment
  • Operating System: Intel Mac OS
  • JDK version: JDK 11
  • Visual Studio Code version: 1.60.0
  • Java extension version: v0.81.0
Steps To Reproduce
  1. Type a normal java statement for example:
log.info("my test " +
        "statement");
  1. Press enter to go to the next line.
Current Result

The cursor in the next line at the column of "statement"

Expected Result

It should be the beginning of the line which is column of log.info...

Additional Informations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the cursor placement problem in Visual Studio Code 1.60.0 with JDK 11 and the Java extension v0.81.0 using the multiline log.info statement shown in the issue. Verify that pressing Enter after the semicolon places the cursor at the beginning of the statement's indentation rather than under the continuation line.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.