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

Handle delete key in cmdline #132

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

bynect
Copy link

@bynect bynect commented Jun 15, 2022

If there is a character after the cursor delete that, otherwise delete the current character.

If the deletion should only delete the character after the cursor these change must be made:

    fn cmdline_handle_delete(&mut self) {
        if self.cmdline.cursor_forward().is_some() {
            self.cmdline.delc();
        }

        if self.cmdline.is_empty() {
            self.cmdline_hide();
        }
    }

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 this pull request may close these issues.

None yet

1 participant