debugger: Process ANSI color escape codes in console (#32817)
- [x] foreground highlights - [x] background highlights - [x] advertise support in DAP capabilities Closes #31372 Release Notes: - Debugger Beta: added basic support for highlighting in the console based on ANSI escape codes.
This commit is contained in:
parent
1f457169ba
commit
ffc6218349
23 changed files with 558 additions and 234 deletions
|
@ -217,8 +217,8 @@ impl Vim {
|
|||
window: &mut Window,
|
||||
cx: &mut Context<Editor>,
|
||||
) {
|
||||
if let Some((_, ranges)) = editor.clear_background_highlights::<VimExchange>(cx) {
|
||||
let previous_range = ranges[0].clone();
|
||||
if let Some(highlights) = editor.clear_background_highlights::<VimExchange>(cx) {
|
||||
let previous_range = highlights[0].range.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.editor_document_highlight_read_background,
|
||||
|theme| theme.colors().editor_document_highlight_read_background,
|
||||
cx,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue