chore: update deps

This commit is contained in:
2025-10-07 14:45:44 +07:00
parent 6e7f63d79a
commit b7693444e6
11 changed files with 599 additions and 474 deletions

View File

@@ -299,8 +299,8 @@ impl Dock {
.read(cx);
let area_bounds = dock_area.bounds;
let mut left_dock_size = Pixels(0.0);
let mut right_dock_size = Pixels(0.0);
let mut left_dock_size = px(0.0);
let mut right_dock_size = px(0.0);
// Get the size of the left dock if it's open and not the current dock
if let Some(left_dock) = &dock_area.left_dock {

View File

@@ -128,7 +128,7 @@ impl RopeExt for Rope {
fn offset_to_position(&self, offset: usize) -> Position {
let point = self.offset_to_point(offset);
let line = self.line(point.row as usize);
let column = line.clip_offset(point.column as usize, sum_tree::Bias::Left);
let column = line.clip_offset(point.column as usize, zed_sum_tree::Bias::Left);
let character = line.slice(0..column).chars().count();
Position::new(point.row, character as u32)
}
@@ -162,7 +162,7 @@ impl RopeExt for Rope {
return None;
}
let offset = self.clip_offset(offset, sum_tree::Bias::Left);
let offset = self.clip_offset(offset, zed_sum_tree::Bias::Left);
self.slice(offset..self.len()).chars().next()
}
@@ -171,7 +171,7 @@ impl RopeExt for Rope {
return None;
}
let offset = self.clip_offset(offset, sum_tree::Bias::Left);
let offset = self.clip_offset(offset, zed_sum_tree::Bias::Left);
let mut left = String::new();
for c in self.reversed_chars_at(offset) {

View File

@@ -14,8 +14,8 @@ use lsp_types::Position;
use rope::{OffsetUtf16, Rope};
use serde::Deserialize;
use smallvec::SmallVec;
use sum_tree::Bias;
use unicode_segmentation::*;
use zed_sum_tree::Bias;
use super::blink_cursor::BlinkCursor;
use super::change::Change;
@@ -481,7 +481,7 @@ impl InputState {
for (line_index, line) in last_layout.lines.iter().enumerate() {
let local_offset = offset.saturating_sub(prev_lines_offset);
if let Some(pos) = line.position_for_index(local_offset, line_height) {
let sub_line_index = (pos.y.0 / line_height.0) as usize;
let sub_line_index = (pos.y.signum() / line_height.signum()) as usize;
let adjusted_pos = point(pos.x + last_layout.line_number_width, pos.y + y_offset);
return (line_index, sub_line_index, Some(adjusted_pos));
}

View File

@@ -247,7 +247,7 @@ impl ResizablePanelGroup {
}
// If total size exceeds container size, adjust the main panel
let total_size: Pixels = new_sizes.iter().map(|s| s.0).sum::<f32>().into();
let total_size: Pixels = new_sizes.iter().map(|s| s.signum()).sum::<f32>().into();
if total_size > container_size {
let overflow = total_size - container_size;
new_sizes[main_ix] = (new_sizes[main_ix] - overflow).max(PANEL_MIN_SIZE);

View File

@@ -18,12 +18,12 @@ const WIDTH: Pixels = px(2. * 2. + 8.);
const MIN_THUMB_SIZE: f32 = 48.;
const THUMB_WIDTH: Pixels = px(6.);
const THUMB_RADIUS: Pixels = Pixels(6. / 2.);
const THUMB_INSET: Pixels = Pixels(2.);
const THUMB_RADIUS: Pixels = px(6. / 2.);
const THUMB_INSET: Pixels = px(2.);
const THUMB_ACTIVE_WIDTH: Pixels = px(8.);
const THUMB_ACTIVE_RADIUS: Pixels = Pixels(8. / 2.);
const THUMB_ACTIVE_INSET: Pixels = Pixels(2.);
const THUMB_ACTIVE_RADIUS: Pixels = px(8. / 2.);
const THUMB_ACTIVE_INSET: Pixels = px(2.);
const FADE_OUT_DURATION: f32 = 3.0;
const FADE_OUT_DELAY: f32 = 2.0;

View File

@@ -6,7 +6,7 @@ use gpui::{
};
use theme::{CLIENT_SIDE_DECORATION_ROUNDING, CLIENT_SIDE_DECORATION_SHADOW};
const WINDOW_BORDER_WIDTH: Pixels = Pixels(1.0);
const WINDOW_BORDER_WIDTH: Pixels = px(1.0);
/// Create a new window border.
pub fn window_border() -> WindowBorder {