Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add force_reverse_video_selection config #4093

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Tomiyou
Copy link

@Tomiyou Tomiyou commented Aug 4, 2023

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

@Tomiyou
Copy link
Author

Tomiyou commented Aug 4, 2023

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.

@John-Gee
Copy link

@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!

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 wez#3440
@LunarLambda
Copy link

Would love to have this

@wez
Copy link
Owner

wez commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants