Remove allow unused from gpui2, vim2 tests and terminal_view2 (#3813)
Release Notes: - N/A
This commit is contained in:
parent
41fb29bc5a
commit
16626592db
6 changed files with 8 additions and 34 deletions
|
@ -1,5 +1,3 @@
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
use anyhow::bail;
|
use anyhow::bail;
|
||||||
use serde::de::{self, Deserialize, Deserializer, Visitor};
|
use serde::de::{self, Deserialize, Deserializer, Visitor};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
|
@ -248,14 +248,8 @@ impl TerminalElement {
|
||||||
{
|
{
|
||||||
let cell_text = cell.c.to_string();
|
let cell_text = cell.c.to_string();
|
||||||
if !is_blank(&cell) {
|
if !is_blank(&cell) {
|
||||||
let cell_style = TerminalElement::cell_style(
|
let cell_style =
|
||||||
&cell,
|
TerminalElement::cell_style(&cell, fg, theme, text_style, hyperlink);
|
||||||
fg,
|
|
||||||
theme,
|
|
||||||
text_style,
|
|
||||||
text_system,
|
|
||||||
hyperlink,
|
|
||||||
);
|
|
||||||
|
|
||||||
let layout_cell = text_system
|
let layout_cell = text_system
|
||||||
.shape_line(
|
.shape_line(
|
||||||
|
@ -315,7 +309,6 @@ impl TerminalElement {
|
||||||
// bg: terminal::alacritty_terminal::ansi::Color,
|
// bg: terminal::alacritty_terminal::ansi::Color,
|
||||||
colors: &Theme,
|
colors: &Theme,
|
||||||
text_style: &TextStyle,
|
text_style: &TextStyle,
|
||||||
text_system: &TextSystem,
|
|
||||||
hyperlink: Option<(HighlightStyle, &RangeInclusive<AlacPoint>)>,
|
hyperlink: Option<(HighlightStyle, &RangeInclusive<AlacPoint>)>,
|
||||||
) -> TextRun {
|
) -> TextRun {
|
||||||
let flags = indexed.cell.flags;
|
let flags = indexed.cell.flags;
|
||||||
|
@ -392,7 +385,6 @@ impl TerminalElement {
|
||||||
let font_size =
|
let font_size =
|
||||||
font_size.map_or(buffer_font_size, |size| theme::adjusted_font_size(size, cx));
|
font_size.map_or(buffer_font_size, |size| theme::adjusted_font_size(size, cx));
|
||||||
|
|
||||||
let settings = ThemeSettings::get_global(cx);
|
|
||||||
let theme = cx.theme().clone();
|
let theme = cx.theme().clone();
|
||||||
|
|
||||||
let link_style = HighlightStyle {
|
let link_style = HighlightStyle {
|
||||||
|
@ -898,7 +890,7 @@ impl PlatformInputHandler for TerminalInputHandler {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
fn text_for_range(&mut self, range_utf16: std::ops::Range<usize>) -> Option<String> {
|
fn text_for_range(&mut self, _: std::ops::Range<usize>) -> Option<String> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#![allow(unused_variables)]
|
|
||||||
//todo!(remove)
|
|
||||||
|
|
||||||
mod persistence;
|
mod persistence;
|
||||||
pub mod terminal_element;
|
pub mod terminal_element;
|
||||||
pub mod terminal_panel;
|
pub mod terminal_panel;
|
||||||
|
@ -68,11 +65,9 @@ pub fn init(cx: &mut AppContext) {
|
||||||
|
|
||||||
register_deserializable_item::<TerminalView>(cx);
|
register_deserializable_item::<TerminalView>(cx);
|
||||||
|
|
||||||
cx.observe_new_views(
|
cx.observe_new_views(|workspace: &mut Workspace, _| {
|
||||||
|workspace: &mut Workspace, cx: &mut ViewContext<Workspace>| {
|
workspace.register_action(TerminalView::deploy);
|
||||||
workspace.register_action(TerminalView::deploy);
|
})
|
||||||
},
|
|
||||||
)
|
|
||||||
.detach();
|
.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +136,6 @@ impl TerminalView {
|
||||||
workspace_id: WorkspaceId,
|
workspace_id: WorkspaceId,
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let view_id = cx.entity_id();
|
|
||||||
cx.observe(&terminal, |_, _, cx| cx.notify()).detach();
|
cx.observe(&terminal, |_, _, cx| cx.notify()).detach();
|
||||||
cx.subscribe(&terminal, move |this, _, event, cx| match event {
|
cx.subscribe(&terminal, move |this, _, event, cx| match event {
|
||||||
Event::Wakeup => {
|
Event::Wakeup => {
|
||||||
|
@ -308,7 +302,7 @@ impl TerminalView {
|
||||||
position: gpui::Point<Pixels>,
|
position: gpui::Point<Pixels>,
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) {
|
) {
|
||||||
let context_menu = ContextMenu::build(cx, |menu, cx| {
|
let context_menu = ContextMenu::build(cx, |menu, _| {
|
||||||
menu.action("Clear", Box::new(Clear))
|
menu.action("Clear", Box::new(Clear))
|
||||||
.action("Close", Box::new(CloseActiveItem { save_intent: None }))
|
.action("Close", Box::new(CloseActiveItem { save_intent: None }))
|
||||||
});
|
});
|
||||||
|
@ -628,7 +622,6 @@ impl Render for TerminalView {
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||||
let terminal_handle = self.terminal.clone();
|
let terminal_handle = self.terminal.clone();
|
||||||
|
|
||||||
let self_id = cx.entity_id();
|
|
||||||
let focused = self.focus_handle.is_focused(cx);
|
let focused = self.focus_handle.is_focused(cx);
|
||||||
|
|
||||||
div()
|
div()
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#![allow(unused)]
|
|
||||||
// todo!()
|
|
||||||
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
use crate::state::Mode;
|
use crate::state::Mode;
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#![allow(unused)]
|
|
||||||
// todo!()
|
|
||||||
|
|
||||||
use editor::{scroll::VERTICAL_SCROLL_MARGIN, test::editor_test_context::ContextHandle};
|
use editor::{scroll::VERTICAL_SCROLL_MARGIN, test::editor_test_context::ContextHandle};
|
||||||
use gpui::{point, px, rems, size, Context};
|
use gpui::{px, size, Context};
|
||||||
use indoc::indoc;
|
use indoc::indoc;
|
||||||
use settings::SettingsStore;
|
use settings::SettingsStore;
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#![allow(unused)]
|
|
||||||
// todo!()
|
|
||||||
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
use editor::test::{
|
use editor::test::{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue