mirror of
https://github.com/tstack/lnav.git
synced 2024-10-26 21:19:54 +03:00
parent
3a63791b22
commit
a2b573aa58
@ -323,7 +323,10 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
|
||||
semi_pred);
|
||||
auto color_index = scn::scan_value<short>(
|
||||
color_index_pair.first.to_string_view());
|
||||
if (!color_index.has_value()) {
|
||||
if (!color_index.has_value()
|
||||
|| color_index.value() < 0
|
||||
|| color_index.value() > 255)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (ansi_code == 38) {
|
||||
|
2
src/third-party/prqlc-c/Cargo.toml
vendored
2
src/third-party/prqlc-c/Cargo.toml
vendored
@ -14,7 +14,7 @@ default = []
|
||||
# We produce both of these at the moment, but could consider refining this. ref
|
||||
# https://github.com/rust-lang/cargo/issues/8607 &
|
||||
# https://github.com/rust-lang/rust/issues/59302
|
||||
crate_type = ["staticlib", "cdylib"]
|
||||
crate_type = ["staticlib"]
|
||||
doctest = false
|
||||
test = false
|
||||
doc = false
|
||||
|
2
src/third-party/rapidyaml/ryml_all.hpp
vendored
2
src/third-party/rapidyaml/ryml_all.hpp
vendored
@ -1766,7 +1766,7 @@ __inline__ static void trap_instruction(void)
|
||||
/* Known problem:
|
||||
* Same problem and workaround as Thumb mode */
|
||||
}
|
||||
#elif defined(__aarch64__) && defined(__APPLE__)
|
||||
#elif defined(__aarch64__) && defined(__APPLE__) && defined(__clang__)
|
||||
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_DEBUGTRAP
|
||||
#elif defined(__aarch64__)
|
||||
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
|
||||
|
@ -430,14 +430,17 @@ view_curses::mvwattrline(WINDOW* window,
|
||||
short cur_fg, cur_bg;
|
||||
pair_content(cur_pair, &cur_fg, &cur_bg);
|
||||
|
||||
if (fg_color[lpc] != -1 && bg_color[lpc] == -1
|
||||
&& base_attrs.ta_bg_color.value_or(0) >= 0)
|
||||
if (fg_color[lpc] >= 0
|
||||
&& fg_color[lpc] < view_colors::vc_active_palette->tc_palette.size()
|
||||
&& bg_color[lpc] == -1 && base_attrs.ta_bg_color.value_or(0) >= 0
|
||||
&& base_attrs.ta_bg_color.value_or(0)
|
||||
< view_colors::vc_active_palette->tc_palette.size())
|
||||
{
|
||||
const auto& fg_color_info
|
||||
= view_colors::vc_active_palette->tc_palette[fg_color[lpc]];
|
||||
= view_colors::vc_active_palette->tc_palette.at(fg_color[lpc]);
|
||||
const auto& bg_color_info
|
||||
= view_colors::vc_active_palette
|
||||
->tc_palette[base_attrs.ta_bg_color.value_or(0)];
|
||||
= view_colors::vc_active_palette->tc_palette.at(
|
||||
base_attrs.ta_bg_color.value_or(0));
|
||||
|
||||
if (!fg_color_info.xc_lab_color.sufficient_contrast(
|
||||
bg_color_info.xc_lab_color))
|
||||
|
Loading…
Reference in New Issue
Block a user