Hi Tim,
> Fixes several behind the scenes issues, but notably addresses> scrolling
Great, nice to see the goroutine leak fix finally comes to aerc. Any
progress with the messed paste issue?
-- Vitaly
On Mon Jun 17, 2024 at 9:26 AM CDT, Vitaly Ovchinnikov wrote:
> Great, nice to see the goroutine leak fix finally comes to aerc. Any> progress with the messed paste issue?
Hey Vitaly -
I can't remember what the paste issue was - was there a thread we discussed it
in?
--
Tim
Tim Culverhouse, Jun 17, 2024 at 17:06:
> On Mon Jun 17, 2024 at 9:26 AM CDT, Vitaly Ovchinnikov wrote:> > Great, nice to see the goroutine leak fix finally comes to aerc. Any> > progress with the messed paste issue?>> Hey Vitaly ->> I can't remember what the paste issue was - was there a thread we discussed it> in?
Shall I wait for vaxis 0.9.3 in a v4? :)
> I can't remember what the paste issue was - was there a thread we> discussed it in?
The text gets messed up when pasting with Cmd+V in nvim insert mode in
aerc, while pasting with "p" works fine. There was a discussion about
this in April, see here:
https://lists.sr.ht/~rjarry/aerc-devel/%3CD0DW4L4EVFJ4.320CKONR199BD@ovch.ru%3E
Or look for "problems with pasting in alacritty" subject in this mailing
list.
-- Vitaly
On Mon Jun 17, 2024 at 11:16 AM CDT, Vitaly Ovchinnikov wrote:
> > I can't remember what the paste issue was - was there a thread we> > discussed it in?>> The text gets messed up when pasting with Cmd+V in nvim insert mode in> aerc, while pasting with "p" works fine. There was a discussion about> this in April, see here:>> https://lists.sr.ht/~rjarry/aerc-devel/%3CD0DW4L4EVFJ4.320CKONR199BD@ovch.ru%3E>> Or look for "problems with pasting in alacritty" subject in this mailing> list.
Ah yes I remember now. I wasn't able to figure out the issue from the
alacritty.recording, and i can't reproduce locally. Do you have a linux VM you
could test in? I wonder if this is somehow a mac-only issue?
--
Tim
> Ah yes I remember now. I wasn't able to figure out the issue from the> alacritty.recording, and i can't reproduce locally. Do you have a> linux VM you could test in? I wonder if this is somehow a mac-only> issue?
I've just reproduced it on FreeBSD directly in both Alacritty and xterm
and on Linux via SSH from Mac. So it doesn't look Mac-specific to me.
Note that this is still Vaxis 0.8.5 or something, the one which is used
in current aerc. If the patched version has a chance to behave better -
let me know.
Here are the steps, I wonder if someone else could reproduce that.
1. Make sure you can yank and paste to/from system clipboard with vim;
2. Reply to this email in aerc+nvim;
3. Leave some space around and make a block of letters this way:
50ia<esc>yy50p
4. Cut this block to the system clipboard by pressing dap
5. Switch to the insert mode and press Shift+Ins/Ctrl+V/Cmd+V to paste
the block back from the system clipboard.
See if you get the straight block of 'a' back. I don't.
-- Vitaly
On Mon Jun 17, 2024 at 11:16 AM CDT, Vitaly Ovchinnikov wrote:
> > I can't remember what the paste issue was - was there a thread we> > discussed it in?>> The text gets messed up when pasting with Cmd+V in nvim insert mode in> aerc, while pasting with "p" works fine. There was a discussion about> this in April, see here:>> https://lists.sr.ht/~rjarry/aerc-devel/%3CD0DW4L4EVFJ4.320CKONR199BD@ovch.ru%3E>> Or look for "problems with pasting in alacritty" subject in this mailing> list.>> -- Vitaly
Ah I found the issue. First, when you are putting on trace logging it's probably
slowing down the system enough that it can handle all the events as they come.
The main event loop has deadlock prevention:
```go
func (vx *Vaxis) PostEvent(ev Event) {
log.Debug("[event] %#v", ev)
select {
case vx.queue <- ev:
return
default:
log.Warn("Event dropped: %T", ev)
}
}
```
If the event queue fills, we start to drop events so that we never deadlock. The
default size is 1024 - Your (50 + 1) * 50 text paste is definitely enough to
fill this up. I tried it out with just using `VAXIS_LOG_LEVEL=warn` and was able
to see the key events being dropped. It becomes even more obvious if your line
of characters is `abcdefghijklmnopqrstubwxyz`.
I propose that (in Vaxis), we still deliver bracketed paste Start and End
events. And in between, we consume in chunks up to 4096 bytes in size. If we hit
the limit, we deliver the Paste event as a string, and keep consuming until the
end. aerc would need to handle the event slightly differently. This would be a
breaking change in Vaxis but one that I think it worth making.
--
Tim
> Ah I found the issue.
Perfect! Thank you.
> This would be a breaking change in Vaxis but one that I think it worth> making.
Well, I believe we should be able to paste long text anyways. Looking
forward to testing the new version.
-- Vitaly