Canop / bacon

background rust code check
https://dystroy.org/bacon
GNU Affero General Public License v3.0
1.79k stars 62 forks source link

Inconsistent terminal behaviour on windows #191

Open IceSentry opened 4 months ago

IceSentry commented 4 months ago

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.

Canop commented 4 months ago

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

IceSentry commented 4 months ago

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.

Canop commented 4 months ago

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.

IceSentry commented 4 months ago

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.

Canop commented 4 months ago

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.

jyn514 commented 1 month ago

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.

IceSentry commented 1 month ago

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.

jyn514 commented 1 month ago

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