public text_part merge_copy(text_part other) {
var copy = new text_part(other.start, other.len, this) { text = other.text };
if (other.fg != util.transparent)
copy.fg = other.fg;
if (other.bg != util.transparent)
copy.bg = other.bg;
if (other.underline)
copy.underline = true;
if (other.bold)
copy.bold = true;
if (other.italic)
copy.italic = true;
if (other.font_name != "")
copy.font_name = other.font_name;
if (other.font_size > 0)
copy.font_size = other.font_size;
if (other.is_find_search)
copy.is_find_search = true;
if (other.is_typed_search)
copy.is_typed_search = true;
if (other.modify_fg != modify_color_type.same)
copy.modify_fg = other.modify_fg;
if (other.modify_bg != modify_color_type.same)
copy.modify_bg = other.modify_bg;
return copy;
}