Skip to content

Macro with backspace behaving weirdly #217

@gerep

Description

@gerep

I have a weird issue where my macros using the backspace key work locally but not in production.

When I run my macro in production, the backspace acts as h, moving the cursor to the left, instead of deleting the character on the left.

During my investigation, I found that the backspace key is being recorded differently in production.

This is how I'm listing the registers:

      console.log(Vim.getRegisterController().registers);

I have created the same macro in both environments. I type daniel and backspace twice, leaving me with dani.

When I run the macro locally, it prints dani, when I run in production, it prints daniel.

This is what I see in my local environment:

changes: (8) ['d', 'a', 'n', 'i', 'e', 'l', InsertModeKey, InsertModeKey]

Image

And this is what I see in production:

changes: (8) ['d', 'a', 'n', 'i', 'e', 'l', Yo, Yo]

Image

Another difference is that in production, the object keys are called Mt and locally, Register.

I thought it could be related to how we minify the project when building to production, but I have disabled it, and nothing has changed.

Maybe these differences are a result of modification, transpile stuff?

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions