Merge PR 9, refactor codebase and manually resolve conflicts while retaining all recent main branch features

This commit is contained in:
TomZz
2026-06-12 20:38:11 +08:00
parent e35a2458bb
commit 99071997d5
4 changed files with 13 additions and 9 deletions
+8 -6
View File
@@ -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
View File
@@ -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);
+1 -1
View File
@@ -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(
+2
View File
@@ -180,6 +180,8 @@ impl Ashell {
.tab_stop(false)
.on_click(cx.listener(|this, checked, _, cx| {
this.show_hidden_files = *checked;
this.config.set_show_hidden_files(*checked);
let _ = this.config.save();
cx.notify();
})),
)