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

[tui][edi] Loss of caret focus bugs #343

Open
nazmulidris opened this issue Jul 13, 2024 · 0 comments · May be fixed by #378
Open

[tui][edi] Loss of caret focus bugs #343

nazmulidris opened this issue Jul 13, 2024 · 0 comments · May be fixed by #378

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Jul 13, 2024

Cut line

Repro steps:

  1. Open an existing MD file (which has more than 1 page in the viewport)
  2. Scroll to some place on the 2nd page
  3. Delete a line
  4. The cursor is gone! You can still type stuff, just don't know where it's landing!

Delete last line

Repro steps:

  1. Open an existing MD file (which has more than 1 page in the viewport)
  2. Scroll to the last line
  3. Delete it
  4. The cursor is gone! You can still type stuff, just don't know where it's landing!

Select heading results in wrong caret position

  1. Run the examples, Warn on clippy and usage of rust 2018 idoms. #4
  2. Place the caret at the start of the editor, then press Shift+End (the heading is selected)
  3. The caret is not where its supposed to be it is on the next line
    Image

In the editor example, opening a dialog and then clearing the contents results in strange UI to be painted on bottom row of dialog

  1. Run the examples, Warn on clippy and usage of rust 2018 idoms. #4
  2. Press Ctrl+l or Ctrl+k, then select the contents and press delete
  3. You will see some strange prompt on the bottom row of the dialog (intentional?)

Wayland support?

Check for wayland support to still work. There were some issues in the rust-scratch/tty repo related to this.

@nazmulidris nazmulidris changed the title [tui][edi] Deleting the last line of text loses caret focus [tui][edi] Loss of caret focus bugs Jul 14, 2024
nazmulidris added a commit that referenced this issue Jan 30, 2025
Remove the complexity of having an editor_engine_internal_api.rs apply_changes()
function that accepts a closure by using a Drop impl on the struct returned by
editor_buffer_struct.rs get_mut().

Also fix this bug:
#343

Closes #343
nazmulidris added a commit that referenced this issue Jan 30, 2025
Remove the complexity of having an editor_engine_internal_api.rs apply_changes()
function that accepts a closure by using a Drop impl on the struct returned by
editor_buffer_struct.rs get_mut().

Also fix this bug:
#343

Closes #343
@nazmulidris nazmulidris linked a pull request Feb 3, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant