Skip to content

reader: Apply fish_color_selection fg color and options in vi visual mode#9717

Merged
ridiculousfish merged 1 commit intofish-shell:masterfrom
ericvw:fish_color_selection-respect-fg
Apr 9, 2023
Merged

reader: Apply fish_color_selection fg color and options in vi visual mode#9717
ridiculousfish merged 1 commit intofish-shell:masterfrom
ericvw:fish_color_selection-respect-fg

Conversation

@ericvw
Copy link
Contributor

@ericvw ericvw commented Apr 7, 2023

Description

Vi visual mode selection highlighting behaves unexpectedly when the selection
foreground and background in the highlight spec don't match. The following
unexpected behaviors are:

  • The foreground color is not being applied when defined by the
    fish_color_selection variable.
  • set_color options (e.g., --bold) would not be applied under the cursor
    when selection begins in the middle of the command line or when the cursor
    moves forward after visually selecting text backward.

With this change, visual selection respects the foreground color and any
set_color options are applied consistently regardless of where visual
selection begins and the position of the cursor during selection.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

…mode

Vi visual mode selection highlighting behaves unexpectedly when the selection
foreground and background in the highlight spec don't match. The following
unexpected behaviors are:

*  The foreground color is not being applied when defined by the
   `fish_color_selection` variable.
* `set_color` options (e.g., `--bold`) would not be applied under the cursor
  when selection begins in the middle of the command line or when the cursor
  moves forward after visually selecting text backward.

With this change, visual selection respects the foreground color and any
`set_color` options are applied consistently regardless of where visual
selection begins and the position of the cursor during selection.
@ridiculousfish
Copy link
Member

Thank you! Very well found for a first contribution.

@ridiculousfish ridiculousfish merged commit 4ed53d4 into fish-shell:master Apr 9, 2023
@ridiculousfish ridiculousfish added this to the fish 3.7.0 milestone Apr 9, 2023
ridiculousfish added a commit that referenced this pull request Apr 9, 2023
@ericvw ericvw deleted the fish_color_selection-respect-fg branch April 9, 2023 03:32
@mqudsi mqudsi modified the milestones: fish 3.7.0, fish 3.6.2 Apr 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants