Skip to content
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

[BUG] Gutter not being displayed correctly when copying and pasting code #4776

Closed
jpelay opened this issue Nov 21, 2023 · 2 comments · Fixed by #4803
Closed

[BUG] Gutter not being displayed correctly when copying and pasting code #4776

jpelay opened this issue Nov 21, 2023 · 2 comments · Fixed by #4803
Assignees
Labels
CodeMirror Issues related to the CodeMirror editor

Comments

@jpelay
Copy link
Member

jpelay commented Nov 21, 2023

When we copy and paste code the gutter drifts, and the longer the code you paste, the bigger the drift. Zooming in and out solves the issue temporally for the user

image

@Felienne
Copy link
Member

This is a codemirror issue I guess? Will you pick this up yourself @jpelay ?

@jpelay
Copy link
Member Author

jpelay commented Nov 21, 2023

This is a codemirror issue I guess? Will you pick this up yourself @jpelay ?

Yes to both of those questions!

@jpelay jpelay self-assigned this Nov 21, 2023
@jpelay jpelay added the CodeMirror Issues related to the CodeMirror editor label Nov 21, 2023
@mergify mergify bot closed this as completed in #4803 Dec 4, 2023
mergify bot pushed a commit that referenced this issue Dec 4, 2023
**Description**

Updates the version of @codemirror/view, which is the component of CodeMirror that handles the UI of the library, to the last version. The issue we were experiencing with the gutter was actually caused by a bug in the library.

**Fixes #4776**

**How to test**

Go to level 12 and delete all of the code in the editor, then copy and paste this code:

```
define simple_function_1 with parameter
    print 'simple_function_1 - 1'
    m = 'simple_function_1 - 2'
    print m
define simple_function_2 with param
    print 'simple_function_2 - 1'
    print param
define simple_function_3 with param_a, param_b, param_c
    if param_a = 'A'
        print 'simple_function_3 - 1'
        print param_b
    else
        print 'simple_function_3 - 2'
        if param_a = 'B'
            print 'simple_function_3 - 2A'
            print param_b
        else
            print 'simple_function_3 - 2B'
            print param_c
a = 'test1'
print call simple_function_3 with 'A', a, 1.0
call simple_function_3 with 'B', a, 1.0
call simple_function_3 with 'C', a, 1.0
```

On this branch version the gutter should be shown correctly, as opposed to alpha.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeMirror Issues related to the CodeMirror editor
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants