bacon icon indicating copy to clipboard operation
bacon copied to clipboard

Inconsistent terminal behaviour on windows

Open IceSentry opened this issue 1 year ago • 8 comments

So I'm having a few issues depending on which terminal I use to run bacon.

In vscode scrolling and copying works fine.

In windows terminal with powershell I can scroll but can't copy any text while bacon is running. I can copy text without issues when it's not running.

In alacritty, I can copy text, but can't scroll while bacon is running. Scrolling works when bacon is not running.

I'm not sure if the issue is with bacon not handling things correctly, or one of those terminal doing something wrong.

IceSentry avatar May 24 '24 23:05 IceSentry

You mean you can't copy text from bacon ? Or are copies outside of bacon also impacted ?

Canop avatar May 25 '24 05:05 Canop

When I tried copying the file path + line number using my mouse I was unable to highlight any of the text inside the bacon output. And since I can't select the text I can't copy it. I wanted to copy the path/line number to go to an error in my editor but was unable to because of that. I'd be happy if there was a built in way to just copy it without my mouse but I didn't se anything about that in the docs.

Here's a video showing what I mean;

https://github.com/Canop/bacon/assets/8348954/c8c553b1-3216-449e-9a4c-36ac37c3ef78

You can't see my mouse but I was trying to highlight any part of the text like I did before starting bacon and nothing was highlighted. As you can see, it does work as expected in alacritty.

IceSentry avatar May 25 '24 05:05 IceSentry

Thanks, that's clear now.

As I don't have a Windows computer, I rely on other devs to help me for the Windows version.

Canop avatar May 25 '24 05:05 Canop

If you can point me towards the area of the code that you think could be causing this I would be happy to investigate further. I'm just not sure where to start.

IceSentry avatar May 25 '24 06:05 IceSentry

You might start with removing the mouse capture which was specifically added for Windows: https://github.com/Canop/bacon/commit/ead2e058f0b71b88993716c5e3db760e3f7a7cc9

Then look at crossterm related things.

Canop avatar May 25 '24 06:05 Canop

fyi every terminal emulator i've tried (kitty, powershell) lets you override the application-specific mouse capture if you hold shift while dragging the mouse.

jyn514 avatar Aug 15 '24 01:08 jyn514

fyi every terminal emulator i've tried (kitty, powershell) lets you override the application-specific mouse capture if you hold shift while dragging the mouse.

powershell isn't a terminal emulator.

Either way, that's not the issue. I can perfectly select text when using windows terminal, it's only when using bacon that I can't select text like I would normally.

IceSentry avatar Aug 15 '24 03:08 IceSentry

@IceSentry see https://github.com/Canop/bacon/issues/174#issuecomment-2290309073

jyn514 avatar Aug 15 '24 03:08 jyn514