Skip to content

Enter Key in editor goes to correct indented position, then moves. #1855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
iplayfast opened this issue Feb 2, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@iplayfast
Copy link

Describe the problem

...
if (avail) {

pushing return after the { move the cursor to indent just after the if which looks acceptable to me. It then after 1/4 of a second moves to the beginning of the line. (very weird).
It seems to happen if there are spaces after the {, and instead of removing trailing spaces and then moving the cursor, it's moving the cursor and then removing the spaces, including the ones before the cursor.

To reproduce

Type the following code

if (this)
if (that) {<space)

reposition the cursor to after the { and push enter.

Expected behavior

remove trailing spaces,add a newline and indent properly.

Arduino IDE version

2.03

Operating system

Linux

Operating system version

Mint 23

Additional context

I've found the editor to be frustrating to use.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@iplayfast iplayfast added the type: imperfection Perceived defect in any part of project label Feb 2, 2023
@per1234 per1234 self-assigned this Feb 2, 2023
@per1234
Copy link
Contributor

per1234 commented Feb 2, 2023

Hi @iplayfast. Thanks for taking the time to submit an issue.

I see we have another report about this at #437.

There are instructions for the workaround to the bug here:

#437 (comment)

It is best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
@per1234 per1234 added conclusion: duplicate Has already been submitted topic: code Related to content of the project itself labels Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants