Skip to content

Cursor randomly jumps to beginning of line #437

Closed
@tomotvos

Description

@tomotvos

Describe the problem

While editing, the cursor sometimes randomly jumps to the beginning of a new line

To reproduce

  1. Edit sketch
  2. Usually when typing a new line, cursor will jump to beginning of next line
  3. Seems to be related to auto-indent with tabs

Expected behavior

The cursor should not jump around and stay where I am typing

Arduino IDE version

2.0.0-beta.7

Operating system

macOS

Operating system version

Big Sur

Additional context

Additional reports

Workaround

  1. Open the "Command Palette" via the Ctrl+Shift+P (Command+Shift+P for macOS users) keyboard shortcut.
  2. Select the "Preferences: Open Settings (UI)" command.
  3. A "Preferences" tab will now open in the Arduino IDE main panel. In the "Search Settings" field, type editor.trimAutoWhitespace
  4. Uncheck the checkbox next to the " Remove trailing auto inserted whitespace." setting.
  5. Click the X icon on the "Preferences" tab.

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

Activity

ubidefeo

ubidefeo commented on Jul 7, 2021

@ubidefeo

@tomotvos
this is a bug we have experienced but had not made it into the backlog yet, so thank you for reporting it.
It is caused by the Language Server pre-processing which we'll get to in the future to make it less prone to interfere with the user's cursor. After all getting the cursor stolen from you as you type is not something anyone can like 👍🏼

per1234

per1234 commented on Oct 24, 2021

@per1234
Contributor

There is a nice screencast demonstrating the bug in the other report we received: #476 (comment)

gdarthy

gdarthy commented on Nov 7, 2021

@gdarthy

It happens everytime you are on new line, then press TAB, cursor jumps back to home position of line, then, when you type anything, it jumps one line below. It's very annoying, I don't understand why this is not fixed yet since it makes working with IDE v2 frustrating. Considering going back to 1.8.

Bug still on IDE 2.0.0-beta.12 on Windows 10

ubidefeo

ubidefeo commented on Nov 7, 2021

@ubidefeo

@gdarthy this bug is due to a faulty interaction between the editor and the Language Server.
We're rewriting the LS to address a lot of these bugs.
We understand the frustration, it bothers us as much as it bothers you :)

The team is hard at work to release a stable IDE 2.0

Thank you for your comment.
Ubi

MArimont3

MArimont3 commented on Feb 14, 2022

@MArimont3

IDE 2.0 rc3 (Windows 10) : cursor jumps after hitting enter -> jumps to new line, removes spaces before previous line, breaks words, inserts spaces, ...
Very weird behavior.
I am using the IDE since end of dec. Seems to get worse and worse. Becomes nearly unusable...

ubidefeo

ubidefeo commented on Jul 29, 2022

@ubidefeo

@cmaglie @per1234
can we close this one?

cmaglie

cmaglie commented on Jul 29, 2022

@cmaglie
Member

can we close this one?

No, it's still happening with the current nightly:

Version: 2.0.0-rc9-nightly-20220729
Date: 2022-07-29T03:40:20.747Z
CLI Version: 0.25.0 [4fd95834]

25 remaining items

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @cmaglie@kittaakos@KurtE@ubidefeo@tomotvos

    Issue actions

      Cursor randomly jumps to beginning of line · Issue #437 · arduino/arduino-ide