mirror of
https://github.com/rust-kotlin/ashell.git
synced 2026-09-22 08:01:00 +00:00
Merge PR 9, refactor codebase and manually resolve conflicts while retaining all recent main branch features
This commit is contained in:
+8
-6
@@ -297,7 +297,7 @@ impl Ashell {
|
||||
sftp_creating_folder: false,
|
||||
sftp_new_folder_input,
|
||||
sftp_delete_scroll_handle: gpui::ScrollHandle::new(),
|
||||
show_hidden_files: false,
|
||||
show_hidden_files: config.show_hidden_files(),
|
||||
transfers: config.transfers(),
|
||||
show_transfers_dialog: false,
|
||||
system_status: None,
|
||||
@@ -640,19 +640,21 @@ impl Ashell {
|
||||
&self,
|
||||
range_utf16: Range<usize>,
|
||||
element_bounds: Bounds<Pixels>,
|
||||
cell_width: f32,
|
||||
line_height: f32,
|
||||
) -> Option<Bounds<Pixels>> {
|
||||
let snapshot = self.active_snapshot()?;
|
||||
let cursor = snapshot.cursor?;
|
||||
let x = element_bounds.origin.x
|
||||
+ px(self.terminal_cell_width()) * cursor.col as f32
|
||||
+ px(self.terminal_cell_width()) * range_utf16.start as f32;
|
||||
+ px(cell_width) * cursor.col as f32
|
||||
+ px(cell_width) * range_utf16.start as f32;
|
||||
let y = element_bounds.origin.y
|
||||
+ px(self.terminal_line_height()) * cursor.row as f32;
|
||||
+ px(line_height) * cursor.row as f32;
|
||||
Some(Bounds::new(
|
||||
point(x, y),
|
||||
size(
|
||||
px(self.terminal_cell_width()),
|
||||
px(self.terminal_line_height()),
|
||||
px(cell_width),
|
||||
px(line_height),
|
||||
),
|
||||
))
|
||||
}
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ fn load_embedded_themes(cx: &mut App) {
|
||||
#[cfg(target_os = "macos")]
|
||||
fn sync_macos_launch_environment() {
|
||||
let shell = std::env::var("SHELL").unwrap_or_else(|_| "/bin/zsh".to_string());
|
||||
let Ok(output) = Command::new(&shell).args(["-l", "-c", "env -0"]).output() else {
|
||||
let Ok(output) = std::process::Command::new(&shell).args(["-l", "-c", "env -0"]).output() else {
|
||||
return;
|
||||
};
|
||||
if !output.status.success() {
|
||||
@@ -240,7 +240,7 @@ fn main() {
|
||||
#[cfg(target_os = "macos")]
|
||||
let app = gpui_platform::application()
|
||||
.with_assets(Assets)
|
||||
.with_quit_mode(QuitMode::Explicit);
|
||||
.with_quit_mode(gpui::QuitMode::Explicit);
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let app = gpui_platform::application().with_assets(Assets);
|
||||
|
||||
@@ -221,7 +221,7 @@ impl InputHandler for TerminalInputHandler {
|
||||
) -> Option<Bounds<Pixels>> {
|
||||
self.view
|
||||
.read(cx)
|
||||
.terminal_ime_bounds_for_range(range_utf16, self.element_bounds)
|
||||
.terminal_ime_bounds_for_range(range_utf16, self.element_bounds, self.cell_width, self.line_height)
|
||||
}
|
||||
|
||||
fn character_index_for_point(
|
||||
|
||||
Reference in New Issue
Block a user