fish-shell/src
Eric N. Vander Weele 5df36130b7 reader: Apply fish_color_selection fg color and options in vi visual 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.

(cherry picked from commit 4ed53d4e3f)
2023-09-08 19:57:56 +02:00
..
builtins builtins: set_color: remove unhandled -v/--version flag 2023-03-05 16:09:47 +01:00
widecharwidth Upgrade widechar_width to Unicode 15 2022-09-26 17:17:17 +02:00
abbrs.cpp Rename abbreviation cursor "sentinel" to "marker" 2022-12-10 16:15:03 -08:00
abbrs.h Rename abbreviation cursor "sentinel" to "marker" 2022-12-10 16:15:03 -08:00
ast.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
ast.h Spelling fixes 2022-10-28 20:10:09 -07:00
ast_node_types.inc Introduce a new fish ast 2020-07-04 14:58:02 -07:00
autoload.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
autoload.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
builtin.cpp builtins: Don't crash for negative return values 2023-09-08 19:57:41 +02:00
builtin.h builtin_print_help to take its error argument by reference 2022-12-31 10:13:03 -08:00
color.cpp color: Use convert_digit 2022-08-27 11:41:29 +02:00
color.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
common.cpp Remove str2wcs special case for MB_CUR_MAX 2023-01-14 22:27:16 +01:00
common.h Update likely/unlikely macros to avoid double negation 2022-11-29 13:26:32 -06:00
complete.cpp Abbreviations to support matching via regex 2022-12-10 15:29:04 -08:00
complete.h Optimize storage of completion entries 2022-10-26 12:48:31 -05:00
enum_map.h enum_map stuff to enum_map.h 2021-10-01 03:39:43 -07:00
enum_set.h Remove enum_iter_t 2023-01-14 12:58:20 -08:00
env.cpp Remove unused 'end' variable from SHLVL calculation 2022-12-30 13:38:47 -08:00
env.h Shrink size of env_mode_flags_t 2022-10-15 15:15:04 -05:00
env_dispatch.cpp Add workaround for Midnight Commander's issue with prompt extraction 2023-02-27 22:24:13 +08:00
env_dispatch.h Revert "I need to take a break. Fixup." 2022-08-22 14:11:52 -07:00
env_universal_common.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
env_universal_common.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
event.cpp event: include handler name in event log output 2022-12-17 18:09:54 +01:00
event.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
exec.cpp Make maybe_t safer against accidental misuse 2022-10-08 11:56:38 -05:00
exec.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
expand.cpp Re-implement abbreviations as a built-in 2022-12-10 15:29:03 -08:00
expand.h Re-implement abbreviations as a built-in 2022-12-10 15:29:03 -08:00
fallback.cpp Add IWYU pragma 2022-09-13 06:56:52 -07:00
fallback.h IWYU 2022-09-12 18:34:19 -07:00
fd_monitor.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
fd_monitor.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
fds.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
fds.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
fish.cpp Cleanup 2023-01-09 22:53:34 +01:00
fish_indent.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
fish_key_reader.cpp fish_key_reader: stop looping on SIGHUP 2022-10-27 17:17:05 -07:00
fish_test_helper.cpp Fix the flaky tty_ownership test on Mac 2022-11-28 15:01:12 -08:00
fish_tests.cpp Remove enum_iter_t 2023-01-14 12:58:20 -08:00
fish_version.cpp Fix build 2021-09-21 18:33:14 -07:00
fish_version.h Revert "Generate FISH_BUILD_VERSION info for cmake builds" 2018-01-08 22:28:10 -08:00
flog.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
flog.h Reimplement abbreviation expansion to support quiet abbreviations 2022-12-10 15:38:46 -08:00
function.cpp function: Don't list empty function names and directories 2022-10-29 10:24:42 +02:00
function.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
future_feature_flags.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
future_feature_flags.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
global_safety.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
highlight.cpp Remove abbreviation triggers 2022-12-10 16:15:00 -08:00
highlight.h IWYU fixup 2022-10-26 20:04:04 -07:00
history.cpp history: Handle Ctrl-C/SIGINT or other errors on output append 2022-10-16 15:38:11 -05:00
history.h Spelling fixes 2022-10-28 20:10:09 -07:00
history_file.cpp history_file.cpp: remove an unused variable 2022-10-26 16:09:02 +02:00
history_file.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
input.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
input.h Spelling fixes 2022-10-28 20:10:09 -07:00
input_common.cpp IWYU fixup 2022-10-26 20:04:04 -07:00
input_common.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
io.cpp Silently handle fd_output_stream_t append errors in case of SIGINT 2022-10-16 15:38:11 -05:00
io.h Make output_stream_t::append() fallible 2022-10-16 15:38:11 -05:00
iothread.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
iothread.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
job_group.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
job_group.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
kill.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
kill.h Implementation of variable with killring entries 2021-04-21 16:39:29 -07:00
lru.h Reimplement autosuggestion-triggered completion loading 2022-06-19 15:15:17 -07:00
maybe.h Add maybe_t::value_or 2022-12-10 12:24:43 -08:00
null_terminated_array.cpp Rework null terminated arrays 2021-03-28 15:31:25 -07:00
null_terminated_array.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
operation_context.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
operation_context.h Spelling fixes 2022-10-28 20:10:09 -07:00
output.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
output.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
pager.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
pager.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
parse_constants.h Reduce FISH_MAX_EVAL_DEPTH under tsan 2022-11-12 14:08:22 -08:00
parse_execution.cpp Make one error translatable 2023-01-13 17:57:04 +01:00
parse_execution.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
parse_tree.cpp IWYU fixup 2022-10-26 20:04:04 -07:00
parse_tree.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
parse_util.cpp Fix error for {$} 2022-11-15 19:02:30 +01:00
parse_util.h Spelling fixes 2022-10-28 20:10:09 -07:00
parser.cpp Spelling fixes 2022-10-28 20:10:09 -07:00
parser.h Spelling fixes 2022-10-28 20:10:09 -07:00
parser_keywords.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
parser_keywords.h Remove unused functions, members (and a variable) 2022-04-09 10:10:44 -07:00
path.cpp Make sure that cd to a relative CDPATH results in absolute $PWD 2022-12-10 11:06:54 +01:00
path.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
postfork.cpp postfork: Also check if interpreter is a directory 2023-01-08 12:44:02 +01:00
postfork.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
print_help.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
print_help.h restyle proc module to match project style 2016-05-02 22:07:58 -07:00
proc.cpp Make maybe_t safer against accidental misuse 2022-10-08 11:56:38 -05:00
proc.h Remove bogus job_chain_is_fully_constructed declaration 2022-12-30 13:35:33 -08:00
re.cpp Fix last PCRE2_UCHAR32 2023-01-23 20:04:43 +01:00
re.h Introduce re::make_anchored 2022-12-10 12:24:43 -08:00
reader.cpp reader: Apply fish_color_selection fg color and options in vi visual mode 2023-09-08 19:57:56 +02:00
reader.h Remove abbreviation triggers 2022-12-10 16:15:00 -08:00
redirection.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
redirection.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
screen.cpp Add workaround for Midnight Commander's issue with prompt extraction 2023-02-27 22:24:13 +08:00
screen.h Add workaround for Midnight Commander's issue with prompt extraction 2023-02-27 22:24:13 +08:00
signal.cpp Add a TSAN workaround and re-enable the test 2022-12-19 15:54:23 -08:00
signal.h Spelling fixes 2022-10-28 20:10:09 -07:00
termsize.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
termsize.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
timer.cpp timer.cpp: iwyu; update includes 2022-08-30 23:56:33 -07:00
timer.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
tinyexpr.cpp Run include-what-you-use 2022-10-26 19:58:40 -07:00
tinyexpr.h tinyexpr.h: rename __TINYEXPR_H__ include guard 2023-01-01 03:20:01 -08:00
tokenizer.cpp Run include-what-you-use 2022-10-26 19:58:40 -07:00
tokenizer.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
topic_monitor.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
topic_monitor.h Spelling fixes 2022-10-28 20:10:09 -07:00
trace.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
trace.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
utf8.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
utf8.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
util.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
util.h Return glob ordering to pre-3.1 state 2020-02-14 19:06:19 +01:00
wait_handle.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
wait_handle.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
wcstringutil.cpp subsequence_in_string: fix broken optimization 2022-12-29 01:02:44 -08:00
wcstringutil.h Re-implement abbreviations as a built-in 2022-12-10 15:29:03 -08:00
wgetopt.cpp Use actual enum names in wgetopt 2022-12-11 10:26:39 -08:00
wgetopt.h Untangle some pointers in wgetopt 2022-12-04 14:48:20 -08:00
wildcard.cpp Revert "Speed up executable command completions" 2023-09-08 19:57:56 +02:00
wildcard.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
wutil.cpp Silence fstatat errors 2023-03-21 17:17:55 +01:00
wutil.h completions: Offer ../ and ./ again (#9477) 2023-01-16 10:05:01 +01:00