Revert "debugger: Process ANSI color escape codes in console" (#32906)

Reverts zed-industries/zed#32817

Release Notes:
- N/A
This commit is contained in:
Cole Miller 2025-06-17 18:13:12 -04:00 committed by GitHub
parent 0cda28f786
commit 2f1d25d7f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 234 additions and 558 deletions

View file

@ -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 {