wezterm
wezterm copied to clipboard
Add force_reverse_video_selection config
This config option allows selection to behave similarly as the cursor does when force_reverse_video_cursor config option is set to true. With this new config set to true, selected text's foreground and background colors are swapped. Addresses issue #3440
There is one thing missing from this PR. When the cursor itself is in reverse video mode, and the cursor lies inside the users selection, the cursors colors should be swapped again. Example: user has force_reverse_video_cursor option enabled and puts the cursor over the character a on the shell prompt. This character now has background and foreground colors swapped. Lets say the original BG color is black and original FG color is white. Reverse video swaps these colors, so BG color is now white and FG color is now black. But then the users selects text in his terminal, this character a and cursor included. Now the cursor's color should be swapped again, so the actual BG color is black again and FG color is white again.
I know it sounds complicated, but when using it, it intuitively makes sense. I would need some help writing that code, since compute_cell_fg_bg() function seems to use params.selected differently than what I assumed it means.
@wez Is this too complicated for you to accept? I think some of users are really eager to have such a common functionality. Thank you!
Would love to have this
Folks, I don't have a lot of spare time, and I'm out numbered by you all. Each time someone mentions me directly on an issue or a PR like this, without themselves making progress on the issue, all it achieves is using up what time I have to see if it was important.
If you want to see this PR move faster, I'm afraid that you'll just have to be patient and wait for me to have the right amount of time and inspiration to tackle the backlog.