mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Working on selection
This commit is contained in:
parent
9e55c60b6a
commit
2b1fa07e89
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,7 @@ use alacritty_terminal::{
|
||||||
event_loop::{EventLoop, Msg, Notifier},
|
event_loop::{EventLoop, Msg, Notifier},
|
||||||
grid::Indexed,
|
grid::Indexed,
|
||||||
index::Point,
|
index::Point,
|
||||||
|
selection,
|
||||||
sync::FairMutex,
|
sync::FairMutex,
|
||||||
term::{
|
term::{
|
||||||
cell::{Cell, Flags},
|
cell::{Cell, Flags},
|
||||||
|
@ -15,8 +16,10 @@ use alacritty_terminal::{
|
||||||
},
|
},
|
||||||
tty, Term,
|
tty, Term,
|
||||||
};
|
};
|
||||||
|
use editor::CursorShape;
|
||||||
use futures::{
|
use futures::{
|
||||||
channel::mpsc::{unbounded, UnboundedSender},
|
channel::mpsc::{unbounded, UnboundedSender},
|
||||||
|
future::select,
|
||||||
StreamExt,
|
StreamExt,
|
||||||
};
|
};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
@ -492,6 +495,7 @@ impl Element for TerminalEl {
|
||||||
));
|
));
|
||||||
|
|
||||||
let content = term.renderable_content();
|
let content = term.renderable_content();
|
||||||
|
let selection = content.selection;
|
||||||
|
|
||||||
let cursor = RectF::new(
|
let cursor = RectF::new(
|
||||||
vec2f(
|
vec2f(
|
||||||
|
@ -510,6 +514,9 @@ impl Element for TerminalEl {
|
||||||
color: Some(Color::white()),
|
color: Some(Color::white()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let select_boxes = vec![];
|
||||||
|
|
||||||
for cell in content.display_iter {
|
for cell in content.display_iter {
|
||||||
let Indexed {
|
let Indexed {
|
||||||
point: Point { line, .. },
|
point: Point { line, .. },
|
||||||
|
@ -518,6 +525,9 @@ impl Element for TerminalEl {
|
||||||
}, //TODO: Learn what 'CellExtra does'
|
}, //TODO: Learn what 'CellExtra does'
|
||||||
} = cell;
|
} = cell;
|
||||||
|
|
||||||
|
if let Some(selection) = selection {
|
||||||
|
selection.contains_cell(&cell, ???, CursorShape::Block);
|
||||||
|
}
|
||||||
let new_highlight = make_style_from_cell(fg, flags);
|
let new_highlight = make_style_from_cell(fg, flags);
|
||||||
HighlightStyle {
|
HighlightStyle {
|
||||||
color: Some(alac_color_to_gpui_color(fg)),
|
color: Some(alac_color_to_gpui_color(fg)),
|
||||||
|
|
Loading…
Reference in a new issue