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

Line duplicated on Ctrl-Up/Down #93

Open
vlisivka opened this issue Nov 22, 2020 · 3 comments
Open

Line duplicated on Ctrl-Up/Down #93

vlisivka opened this issue Nov 22, 2020 · 3 comments

Comments

@vlisivka
Copy link

vlisivka commented Nov 22, 2020

Describe the bug
If a file contains one line, and Ctrl-Up or Ctrl-Down is pressed, the line is duplicated.

To Reproduce

  1. Create new file.
  2. Enter one line, without pressing of Enter key.
  3. Press Ctrl-Up.

Expected behavior
Editor must do nothing, because the line cannot be moved.

Actual behavior
The line is duplicated.

Screenshots
Before:
Screenshot_2020-11-22_21:27:05

After pressing of Ctrl-Up:
Screenshot_2020-11-22_21:27:15

Desktop (please complete the following information):

  • OS: Fedora Linux
@curlpipe
Copy link
Owner

thanks for the report.

@tengkuizdihar
Copy link

This problem might be caused by the config/ox.ron. Right now, CTRL+UP and CTRL+DOWN is binded to "move line up" and "move line down" respectively. I suspect that there's something wrong with the macro itself.

@tengkuizdihar
Copy link

I'm new to this project, but I suspect the macro is using the instruction inside of interpret_line(...) in oxa.rs right? I think the problem can be solved by fixing the behavior of Event::InsertLineBelow and Event::InsertLineAbove in the match scope inside of execute(...) in document.rs.

Correct me if I'm wrong, I consider myself a noob at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants