Remove the 2s from source code
This commit is contained in:
parent
a3565225ad
commit
d11ff14b57
115 changed files with 1473 additions and 1549 deletions
|
@ -10,10 +10,10 @@ doctest = false
|
|||
|
||||
|
||||
[dependencies]
|
||||
gpui2 = { path = "../gpui2" }
|
||||
settings2 = { path = "../settings2" }
|
||||
db2 = { path = "../db2" }
|
||||
theme2 = { path = "../theme2" }
|
||||
gpui = { package = "gpui2", path = "../gpui2" }
|
||||
settings = { package = "settings2", path = "../settings2" }
|
||||
db = { package = "db2", path = "../db2" }
|
||||
theme = { package = "theme2", path = "../theme2" }
|
||||
util = { path = "../util" }
|
||||
|
||||
alacritty_terminal = { git = "https://github.com/zed-industries/alacritty", rev = "33306142195b354ef3485ca2b1d8a85dfc6605ca" }
|
||||
|
|
|
@ -113,7 +113,7 @@ use alacritty_terminal::term::color::Rgb as AlacRgb;
|
|||
// let b = (i % 36) % 6;
|
||||
// (r, g, b)
|
||||
// }
|
||||
use gpui2::Rgba;
|
||||
use gpui::Rgba;
|
||||
|
||||
//Convenience method to convert from a GPUI color to an alacritty Rgb
|
||||
pub fn to_alac_rgb(color: impl Into<Rgba>) -> AlacRgb {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// The mappings defined in this file where created from reading the alacritty source
|
||||
use alacritty_terminal::term::TermMode;
|
||||
use gpui2::Keystroke;
|
||||
use gpui::Keystroke;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
enum AlacModifiers {
|
||||
|
@ -278,7 +278,7 @@ fn modifier_code(keystroke: &Keystroke) -> u32 {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use gpui2::Modifiers;
|
||||
use gpui::Modifiers;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use alacritty_terminal::grid::Dimensions;
|
|||
/// with modifications for our circumstances
|
||||
use alacritty_terminal::index::{Column as GridCol, Line as GridLine, Point as AlacPoint, Side};
|
||||
use alacritty_terminal::term::TermMode;
|
||||
use gpui2::{px, Modifiers, MouseButton, MouseMoveEvent, Pixels, Point, ScrollWheelEvent};
|
||||
use gpui::{px, Modifiers, MouseButton, MouseMoveEvent, Pixels, Point, ScrollWheelEvent};
|
||||
|
||||
use crate::TerminalSize;
|
||||
|
||||
|
@ -45,10 +45,10 @@ impl AlacMouseButton {
|
|||
fn from_move(e: &MouseMoveEvent) -> Self {
|
||||
match e.pressed_button {
|
||||
Some(b) => match b {
|
||||
gpui2::MouseButton::Left => AlacMouseButton::LeftMove,
|
||||
gpui2::MouseButton::Middle => AlacMouseButton::MiddleMove,
|
||||
gpui2::MouseButton::Right => AlacMouseButton::RightMove,
|
||||
gpui2::MouseButton::Navigate(_) => AlacMouseButton::Other,
|
||||
gpui::MouseButton::Left => AlacMouseButton::LeftMove,
|
||||
gpui::MouseButton::Middle => AlacMouseButton::MiddleMove,
|
||||
gpui::MouseButton::Right => AlacMouseButton::RightMove,
|
||||
gpui::MouseButton::Navigate(_) => AlacMouseButton::Other,
|
||||
},
|
||||
None => AlacMouseButton::NoneMove,
|
||||
}
|
||||
|
@ -56,17 +56,17 @@ impl AlacMouseButton {
|
|||
|
||||
fn from_button(e: MouseButton) -> Self {
|
||||
match e {
|
||||
gpui2::MouseButton::Left => AlacMouseButton::LeftButton,
|
||||
gpui2::MouseButton::Right => AlacMouseButton::MiddleButton,
|
||||
gpui2::MouseButton::Middle => AlacMouseButton::RightButton,
|
||||
gpui2::MouseButton::Navigate(_) => AlacMouseButton::Other,
|
||||
gpui::MouseButton::Left => AlacMouseButton::LeftButton,
|
||||
gpui::MouseButton::Right => AlacMouseButton::MiddleButton,
|
||||
gpui::MouseButton::Middle => AlacMouseButton::RightButton,
|
||||
gpui::MouseButton::Navigate(_) => AlacMouseButton::Other,
|
||||
}
|
||||
}
|
||||
|
||||
fn from_scroll(e: &ScrollWheelEvent) -> Self {
|
||||
let is_positive = match e.delta {
|
||||
gpui2::ScrollDelta::Pixels(pixels) => pixels.y > px(0.),
|
||||
gpui2::ScrollDelta::Lines(lines) => lines.y > 0.,
|
||||
gpui::ScrollDelta::Pixels(pixels) => pixels.y > px(0.),
|
||||
gpui::ScrollDelta::Lines(lines) => lines.y > 0.,
|
||||
};
|
||||
|
||||
if is_positive {
|
||||
|
@ -118,7 +118,7 @@ pub fn alt_scroll(scroll_lines: i32) -> Vec<u8> {
|
|||
|
||||
pub fn mouse_button_report(
|
||||
point: AlacPoint,
|
||||
button: gpui2::MouseButton,
|
||||
button: gpui::MouseButton,
|
||||
modifiers: Modifiers,
|
||||
pressed: bool,
|
||||
mode: TermMode,
|
||||
|
|
|
@ -33,7 +33,7 @@ use mappings::mouse::{
|
|||
|
||||
use procinfo::LocalProcessInfo;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings2::Settings;
|
||||
use settings::Settings;
|
||||
use terminal_settings::{AlternateScroll, Shell, TerminalBlink, TerminalSettings};
|
||||
use util::truncate_and_trailoff;
|
||||
|
||||
|
@ -49,7 +49,7 @@ use std::{
|
|||
};
|
||||
use thiserror::Error;
|
||||
|
||||
use gpui2::{
|
||||
use gpui::{
|
||||
px, AnyWindowHandle, AppContext, Bounds, ClipboardItem, EventEmitter, Hsla, Keystroke,
|
||||
ModelContext, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent, Pixels,
|
||||
Point, ScrollWheelEvent, Size, Task, TouchPhase,
|
||||
|
@ -1409,7 +1409,7 @@ mod tests {
|
|||
index::{Column, Line, Point as AlacPoint},
|
||||
term::cell::Cell,
|
||||
};
|
||||
use gpui2::{point, size, Pixels};
|
||||
use gpui::{point, size, Pixels};
|
||||
use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
|
||||
|
||||
use crate::{content_index_for_mouse, IndexedCell, TerminalContent, TerminalSize};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use gpui2::{AppContext, FontFeatures};
|
||||
use gpui::{AppContext, FontFeatures};
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{collections::HashMap, path::PathBuf};
|
||||
|
@ -98,7 +98,7 @@ impl TerminalSettings {
|
|||
// }
|
||||
}
|
||||
|
||||
impl settings2::Settings for TerminalSettings {
|
||||
impl settings::Settings for TerminalSettings {
|
||||
const KEY: Option<&'static str> = Some("terminal");
|
||||
|
||||
type FileContent = TerminalSettingsContent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue