Skip to content

Fix cursor misalignment issue with long code snippets #313

@code-snippets-bot

Description

@code-snippets-bot

Current behavior

The writing cursor becomes vertically misaligned as the number of lines in a code snippet increases. By around 2000 lines, the cursor is noticeably elevated, and by 3000 lines, it is significantly off, making text selection difficult.

Expected behavior

The cursor should remain properly aligned regardless of the number of lines in the code snippet, similar to the behavior in other editors like Sublime or TextEdit.

Steps to reproduce

  1. Create a code snippet with 2000 to 3000 lines.
  2. Observe the cursor alignment as you add more lines.

WordPress version

Please specify the version of WordPress you are using.

Code Snippets version

Please specify the version of Code Snippets you are using.

Code Snippets license

Core (free)

Anything else?

Attached images demonstrate the misalignment issue: image.png, cursor_alignment.png


conversation id: m232raeq-d92b9b05-b1e3-423f-810b-3ad240c05622

Metadata

Metadata

Labels

supportGeneral question or request for help

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions