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

@ -222,7 +222,7 @@ impl Vim {
editor.highlight_background::<HighlightOnYank>(
&ranges_to_highlight,
|theme| theme.colors().editor_document_highlight_read_background,
|colors| colors.editor_document_highlight_read_background,
cx,
);
cx.spawn(async move |this, cx| {

View file

@ -217,8 +217,8 @@ impl Vim {
window: &mut Window,
cx: &mut Context<Editor>,
) {
if let Some(highlights) = editor.clear_background_highlights::<VimExchange>(cx) {
let previous_range = highlights[0].range.clone();
if let Some((_, ranges)) = editor.clear_background_highlights::<VimExchange>(cx) {
let previous_range = ranges[0].clone();
let new_range_start = new_range.start.to_offset(&snapshot.buffer_snapshot);
let new_range_end = new_range.end.to_offset(&snapshot.buffer_snapshot);
@ -261,7 +261,7 @@ impl Vim {
let ranges = [new_range];
editor.highlight_background::<VimExchange>(
&ranges,
|theme| theme.colors().editor_document_highlight_read_background,
|theme| theme.editor_document_highlight_read_background,
cx,
);
}

View file

@ -864,13 +864,16 @@ async fn test_jk(cx: &mut gpui::TestAppContext) {
fn assert_pending_input(cx: &mut VimTestContext, expected: &str) {
cx.update_editor(|editor, window, cx| {
let snapshot = editor.snapshot(window, cx);
let highlights = editor.text_highlights::<editor::PendingInput>(cx).unwrap();
let highlights = editor
.text_highlights::<editor::PendingInput>(cx)
.unwrap()
.1;
let (_, ranges) = marked_text_ranges(expected, false);
assert_eq!(
highlights
.iter()
.map(|(highlight, _)| highlight.to_offset(&snapshot.buffer_snapshot))
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot))
.collect::<Vec<_>>(),
ranges
)
@ -920,12 +923,15 @@ async fn test_jk_delay(cx: &mut gpui::TestAppContext) {
cx.assert_state("ˇjhello", Mode::Insert);
cx.update_editor(|editor, window, cx| {
let snapshot = editor.snapshot(window, cx);
let highlights = editor.text_highlights::<editor::PendingInput>(cx).unwrap();
let highlights = editor
.text_highlights::<editor::PendingInput>(cx)
.unwrap()
.1;
assert_eq!(
highlights
.iter()
.map(|(highlight, _)| highlight.to_offset(&snapshot.buffer_snapshot))
.map(|highlight| highlight.to_offset(&snapshot.buffer_snapshot))
.collect::<Vec<_>>(),
vec![0..1]
)