use syntect::highlighting::Style as SyntectStyle;
use unicode_segmentation::UnicodeSegmentation;
use unicode_width::UnicodeWidthStr;
use crate::cli;
use crate::config::INLINE_SYMBOL_WIDTH_1;
use crate::fatal;
use crate::config::Config;
use crate::delta::DiffType;
use crate::delta::State;
use crate::features::line_numbers::{self, SideBySideLineWidth};
use crate::features::side_by_side::{available_line_width, line_is_too_long, Left, Right};
use crate::minusplus::*;
use crate::paint::LineSections;
use crate::style::Style;
use crate::utils::syntect::FromDeltaStyle;
/// See [`wrap_line`] for documentation.
#[derive(Clone, Debug)]
pub struct WrapConfig {
pub left_symbol: String,
pub right_symbol: String,
pub right_prefix_symbol: String,
// In fractions of 1000 so that a >100 wide panel can
// still be configured down to a single character.
pub use_wrap_right_permille: usize,
// This value is --wrap-max-lines + 1, and unlimited is 0, see
// adapt_wrap_max_lines_argument()
pub max_lines: usize,
pub inline_hint_syntect_style: SyntectStyle,
}
impl WrapConfig {
pub fn