chore: Locking core-text version
This commit is contained in:
parent
76424dd0ae
commit
c67821ef39
7 changed files with 12 additions and 12 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -2833,6 +2833,7 @@ dependencies = [
|
|||
"aho-corasick",
|
||||
"anyhow",
|
||||
"chrono",
|
||||
"core-text",
|
||||
"enum-iterator",
|
||||
"gpui",
|
||||
"gpui-component-macros",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Here is the first application: [Longbridge Pro](https://longbridge.com/desktop),
|
|||
|
||||
```toml
|
||||
gpui = "0.2.2"
|
||||
gpui-component = "0.4.0"
|
||||
gpui-component = "0.5.1"
|
||||
```
|
||||
|
||||
### Basic Example
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ quote = "1.0"
|
|||
syn = "2.0"
|
||||
|
||||
[package.metadata.cargo-machete]
|
||||
ignored = ["proc-macro2"]
|
||||
ignored = ["proc-macro2", "core-text"]
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ tree-sitter-typescript = { version = "0.23.2", optional = true }
|
|||
tree-sitter-yaml = { version = "0.7.1", optional = true }
|
||||
tree-sitter-zig = { version = "1.1.2", optional = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
core-text = "=21.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gpui = { workspace = true, features = ["test-support"] }
|
||||
indoc = "2"
|
||||
|
|
|
|||
|
|
@ -925,8 +925,7 @@ impl InputState {
|
|||
let left_part = self.text.slice(0..offset).to_string();
|
||||
|
||||
UnicodeSegmentation::split_word_bound_indices(left_part.as_str())
|
||||
.filter(|(_, s)| !s.trim_start().is_empty())
|
||||
.next_back()
|
||||
.rfind(|(_, s)| !s.trim_start().is_empty())
|
||||
.map(|(i, _)| i)
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1232,13 +1232,10 @@ impl Render for PopupMenu {
|
|||
let view = cx.entity().clone();
|
||||
let items_count = self.menu_items.len();
|
||||
|
||||
let max_height = self.max_height.map_or_else(
|
||||
|| {
|
||||
let max_height = self.max_height.unwrap_or_else(|| {
|
||||
let window_half_height = window.window_bounds().get_bounds().size.height * 0.5;
|
||||
window_half_height.min(px(450.))
|
||||
},
|
||||
|height| height,
|
||||
);
|
||||
});
|
||||
|
||||
let has_left_icon = self
|
||||
.menu_items
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ impl TextView {
|
|||
pub fn style(mut self, style: TextViewStyle) -> Self {
|
||||
if let Some(init_state) = &mut self.init_state {
|
||||
match init_state {
|
||||
InitState::Initializing { style: s, .. } => *s = Box::new(style),
|
||||
InitState::Initializing { style: s, .. } => **s = style,
|
||||
InitState::Initialized { tx } => {
|
||||
let _ = tx.try_send(Update::Style(Box::new(style)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue