Revert "debugger: Process ANSI color escape codes in console" (#32906)
Reverts zed-industries/zed#32817 Release Notes: - N/A
This commit is contained in:
parent
0cda28f786
commit
2f1d25d7f3
23 changed files with 234 additions and 558 deletions
|
@ -1432,11 +1432,8 @@ impl SearchableItem for Editor {
|
|||
fn get_matches(&self, _window: &mut Window, _: &mut App) -> Vec<Range<Anchor>> {
|
||||
self.background_highlights
|
||||
.get(&TypeId::of::<BufferSearchHighlights>())
|
||||
.map_or(Vec::new(), |highlights| {
|
||||
highlights
|
||||
.iter()
|
||||
.map(|highlight| highlight.range.clone())
|
||||
.collect()
|
||||
.map_or(Vec::new(), |(_color, ranges)| {
|
||||
ranges.iter().cloned().collect()
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1455,14 +1452,14 @@ impl SearchableItem for Editor {
|
|||
_: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
let existing_ranges = self
|
||||
let existing_range = self
|
||||
.background_highlights
|
||||
.get(&TypeId::of::<BufferSearchHighlights>())
|
||||
.map(|highlights| highlights.iter().map(|highlight| &highlight.range));
|
||||
let updated = !existing_ranges.is_some_and(|existing_ranges| existing_ranges.eq(matches));
|
||||
.map(|(_, range)| range.as_ref());
|
||||
let updated = existing_range != Some(matches);
|
||||
self.highlight_background::<BufferSearchHighlights>(
|
||||
matches,
|
||||
|theme| theme.colors().search_match_background,
|
||||
|theme| theme.search_match_background,
|
||||
cx,
|
||||
);
|
||||
if updated {
|
||||
|
@ -1483,12 +1480,7 @@ impl SearchableItem for Editor {
|
|||
if self.has_filtered_search_ranges() {
|
||||
self.previous_search_ranges = self
|
||||
.clear_background_highlights::<SearchWithinRange>(cx)
|
||||
.map(|highlights| {
|
||||
highlights
|
||||
.iter()
|
||||
.map(|highlight| highlight.range.clone())
|
||||
.collect()
|
||||
})
|
||||
.map(|(_, ranges)| ranges)
|
||||
}
|
||||
|
||||
if !enabled {
|
||||
|
@ -1710,11 +1702,8 @@ impl SearchableItem for Editor {
|
|||
let search_within_ranges = self
|
||||
.background_highlights
|
||||
.get(&TypeId::of::<SearchWithinRange>())
|
||||
.map_or(vec![], |highlights| {
|
||||
highlights
|
||||
.iter()
|
||||
.map(|highlight| highlight.range.clone())
|
||||
.collect::<Vec<_>>()
|
||||
.map_or(vec![], |(_color, ranges)| {
|
||||
ranges.iter().cloned().collect::<Vec<_>>()
|
||||
});
|
||||
|
||||
cx.background_spawn(async move {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue