hired icon indicating copy to clipboard operation
hired copied to clipboard

Paste doesn't include newlines

Open sidju opened this issue 1 year ago • 1 comments

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 avatar Feb 26 '24 15:02 sidju

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....

sidju avatar Feb 26 '24 15:02 sidju