Skip to content

Linux Mint. IDE auto-inserts spurious carriage returns, backspaces, and tabs #1534

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
ceptimus opened this issue Oct 5, 2022 · 5 comments
Closed
3 tasks done
Assignees
Labels
conclusion: duplicate Has already been submitted type: imperfection Perceived defect in any part of project

Comments

@ceptimus
Copy link

ceptimus commented Oct 5, 2022

Describe the problem

When editing a sketch, cursor randomly jumps to start of next line. Sometimes, indenting goes haywire - as though the IDE self-inserts a newline, followed by one or more backspaces. I've not noticed it randomly deleting characters I've already typed, however.
Also, (noticable by selecting a block) there is lots of trailing whitespace, probably tabs, at the ends of lines.
No problems on the same PC using IDE 1.8.19, nor with other non-Arduino applications and text editors.

I've seen reports of this issue, but from a year or more ago, and they were closed.

To reproduce

Try running the IDE under Linux Mint Cinnamon, current latest version.

Expected behavior

You may see the IDE auto-inserting characters - though I suppose it may also only do it on some PCs.

Arduino IDE version

2.0.0 Date 2022-09-14T07:05:28.855Z CLI Version 0.27.1 [a900cfb2]

Operating system

Linux

Operating system version

Linux Mint 21 Cinnamon 5.4.12

Additional context

Intel Core i7-7740X 16GB RAM, NVIDIA GeForce GTX 1080 graphics card

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
@ceptimus ceptimus added the type: imperfection Perceived defect in any part of project label Oct 5, 2022
@per1234
Copy link
Contributor

per1234 commented Oct 5, 2022

Hi @ceptimus. Thanks for your report.

When editing a sketch, cursor randomly jumps to start of next line

We have an previous issue we are using to track this bug: #437

I've not noticed it randomly deleting characters I've already typed, however.
Also, (noticable by selecting a block) there is lots of trailing whitespace, probably tabs, at the ends of lines.

I don't remember receiving a previous report of this, but since this bug is related to the IDE's handling of trailing whitespace, it might very well have the same cause.

Please try this and then comment here to let me know the results:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
  3. A "Preferences" tab will now open in the Arduino IDE. In the "Search Settings" field of that tab, type editor.trimAutoWhitespace
  4. Uncheck the checkbox next to " Remove trailing auto inserted whitespace."
  5. Click the X icon on the "Preferences" tab.
  6. Perform whatever editing actions you were doing previously that produced the unexpected trailing whitespace.

Please note that the workaround for #437 I describe above disables the IDE's automatic removal of whitespace that was generated for indenting the new line to match the previous line when that whitespace would become trailing whitespace (see my explanation here for details). So it is expected that this specific type of trailing whitespace will now occur. But your description indicates there is other completely unexpected trailing whitespace. It is the effect on that whitespace I am interested in.

@per1234 per1234 self-assigned this Oct 5, 2022
@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Oct 5, 2022
@per1234
Copy link
Contributor

per1234 commented Oct 11, 2022

Hi @ceptimus. Did you ever get a chance to try the experiment I requested in my previous reply? If so, what was the result?

@ceptimus
Copy link
Author

ceptimus commented Oct 11, 2022 via email

@per1234
Copy link
Contributor

per1234 commented Oct 12, 2022

Thanks for the update.

I can make and upload a YouTube video of it happening.

I appreciate the offer. Someone was already kind enough to do this and it really was helpful for understanding the nature of the problem: #476 (comment)

Since that time, I have also been affected by this issue on one of my computers, so I definitely am familiar with the behavior.

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 original issue #437.

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 Oct 12, 2022
@per1234 per1234 added conclusion: duplicate Has already been submitted and removed status: waiting for information More information must be provided before work can proceed labels Oct 12, 2022
@ceptimus
Copy link
Author

ceptimus commented Oct 12, 2022 via email

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 type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants