mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-26 16:37:58 +00:00
Fixed merge conflict
This commit is contained in:
parent
a8237858bc
commit
415e28e2d3
3 changed files with 15 additions and 16 deletions
|
@ -9,11 +9,8 @@ use alacritty_terminal::{
|
|||
Term,
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
use dirs::home_dir;
|
||||
=======
|
||||
use color_translation::{get_color_at_index, to_alac_rgb};
|
||||
>>>>>>> 3fe0d66d (Began working on selections, refactored colors)
|
||||
use dirs::home_dir;
|
||||
use futures::{
|
||||
channel::mpsc::{unbounded, UnboundedSender},
|
||||
StreamExt,
|
||||
|
@ -475,13 +472,12 @@ fn get_working_directory(wt: &LocalWorktree) -> Option<PathBuf> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use std::{path::Path, sync::atomic::AtomicUsize, time::Duration};
|
||||
|
||||
use super::*;
|
||||
use alacritty_terminal::{grid::GridIterator, term::cell::Cell};
|
||||
use gpui::TestAppContext;
|
||||
use itertools::Itertools;
|
||||
use project::{FakeFs, Fs, RealFs, RemoveOptions, Worktree};
|
||||
use std::{path::Path, sync::atomic::AtomicUsize, time::Duration};
|
||||
|
||||
///Basic integration test, can we get the terminal to show up, execute a command,
|
||||
//and produce noticable output?
|
||||
|
@ -489,7 +485,6 @@ mod tests {
|
|||
async fn test_terminal(cx: &mut TestAppContext) {
|
||||
let terminal = cx.add_view(Default::default(), |cx| Terminal::new(cx, None));
|
||||
cx.set_condition_duration(Duration::from_secs(2));
|
||||
|
||||
terminal.update(cx, |terminal, cx| {
|
||||
terminal.write_to_pty(&Input(("expr 3 + 4".to_string()).to_string()), cx);
|
||||
terminal.carriage_return(&Return, cx);
|
||||
|
@ -499,6 +494,7 @@ mod tests {
|
|||
.condition(cx, |terminal, _cx| {
|
||||
let term = terminal.term.clone();
|
||||
let content = grid_as_str(term.lock().renderable_content().display_iter);
|
||||
dbg!(&content);
|
||||
content.contains("7")
|
||||
})
|
||||
.await;
|
||||
|
|
|
@ -247,7 +247,7 @@ impl Element for TerminalEl {
|
|||
|
||||
//TODO: Better way of doing this?
|
||||
let mutex1 = terminal_mutex.clone();
|
||||
let _mutex2 = terminal_mutex.clone();
|
||||
let mutex2 = terminal_mutex.clone();
|
||||
|
||||
cx.scene.push_mouse_region(MouseRegion {
|
||||
view_id: self.view.id(),
|
||||
|
@ -269,14 +269,18 @@ impl Element for TerminalEl {
|
|||
cx.focus_parent_view()
|
||||
})),
|
||||
bounds: visible_bounds,
|
||||
drag: Some(Rc::new(move |_delta, _cx| {
|
||||
// let (point, side) = mouse_to_cell_data(pos, origin, cur_size, display_offset);
|
||||
drag: Some(Rc::new(move |_delta, pos, cx| {
|
||||
let (point, side) = mouse_to_cell_data(pos, origin, cur_size, display_offset);
|
||||
|
||||
// let mut term = mutex2.lock();
|
||||
// if let Some(mut selection) = term.selection.take() {
|
||||
// selection.update(point, side);
|
||||
// term.selection = Some(selection);
|
||||
// }
|
||||
let mut term = mutex2.lock();
|
||||
if let Some(mut selection) = term.selection.take() {
|
||||
selection.update(point, side);
|
||||
term.selection = Some(selection);
|
||||
} else {
|
||||
term.selection = Some(Selection::new(SelectionType::Simple, point, side));
|
||||
}
|
||||
|
||||
cx.notify()
|
||||
})),
|
||||
..Default::default()
|
||||
});
|
||||
|
|
1
styles/package-lock.json
generated
1
styles/package-lock.json
generated
|
@ -5,7 +5,6 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "styles",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in a new issue