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

Paste doesn't include newlines #41

Open
sidju opened this issue Feb 26, 2024 · 1 comment
Open

Paste doesn't include newlines #41

sidju opened this issue Feb 26, 2024 · 1 comment

Comments

@sidju
Copy link
Owner

sidju commented Feb 26, 2024

It seems that newlines aren't included when text is pasted into the editor. I'll have to look over the crossterm configurations about this, because I'm quite certain it has worked before...

@sidju
Copy link
Owner Author

sidju commented Feb 26, 2024

Probable cause is that since you hold ctrl when pasting the check against modifiers https://github.com/sidju/hired/blob/master/src/hui/input.rs#L200 blocks the input of specifically enter but not characters.

From testing it appears that gnome terminal lies about the modifiers when pressing enter and is thus able to paste enter, so this is most likely the cause. Perhaps it is time to handle bracketed paste? But at the same time I like treating it the same so you can paste an ed script straight into hired to run it...

I'll have to think on the modifier handling, maybe try to figure out what problem I was solving with that check....

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

1 participant