Compare commits
21 Commits
nixos-test
...
v0.153.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7234166077 | ||
|
|
4105d27545 | ||
|
|
5f08341c9b | ||
|
|
9a261cd028 | ||
|
|
afeca3480f | ||
|
|
58a12ef252 | ||
|
|
d3d1a8f55d | ||
|
|
553edc2662 | ||
|
|
5fff524870 | ||
|
|
47779a9334 | ||
|
|
ecc1ba168a | ||
|
|
cfe5dd8d04 | ||
|
|
c58a552161 | ||
|
|
efe773a796 | ||
|
|
4c81907cc2 | ||
|
|
5880b24c79 | ||
|
|
576b38d598 | ||
|
|
7e4bc1235a | ||
|
|
39f57fa538 | ||
|
|
7058a91b82 | ||
|
|
f9ec8405c5 |
3
.github/workflows/bump_patch_version.yml
vendored
3
.github/workflows/bump_patch_version.yml
vendored
@@ -15,8 +15,7 @@ concurrency:
|
||||
jobs:
|
||||
bump_patch_version:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- test
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
|
||||
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
@@ -39,16 +39,7 @@ jobs:
|
||||
run: git clean -df
|
||||
|
||||
- name: Check spelling
|
||||
run: |
|
||||
if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; then
|
||||
echo "Installing typos-cli@$TYPOS_CLI_VERSION..."
|
||||
cargo install "typos-cli@$TYPOS_CLI_VERSION"
|
||||
else
|
||||
echo "typos-cli@$TYPOS_CLI_VERSION is already installed."
|
||||
fi
|
||||
typos
|
||||
env:
|
||||
TYPOS_CLI_VERSION: "1.23.3"
|
||||
run: script/check-spelling
|
||||
|
||||
- name: Run style checks
|
||||
uses: ./.github/actions/check_style
|
||||
@@ -110,8 +101,7 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
name: (Linux) Run Clippy and tests
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- deploy
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Add Rust to the PATH
|
||||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
@@ -121,6 +111,14 @@ jobs:
|
||||
with:
|
||||
clean: false
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
|
||||
with:
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: ./script/linux
|
||||
|
||||
- name: cargo clippy
|
||||
run: ./script/clippy
|
||||
|
||||
@@ -271,24 +269,20 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
name: Create a Linux bundle
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- deploy
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||
needs: [linux_tests]
|
||||
env:
|
||||
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
||||
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
||||
steps:
|
||||
- name: Add Rust to the PATH
|
||||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
with:
|
||||
clean: false
|
||||
|
||||
- name: Limit target directory size
|
||||
run: script/clear-target-dir-if-larger-than 100
|
||||
- name: Install Linux dependencies
|
||||
run: ./script/linux
|
||||
|
||||
- name: Determine version and release channel
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
@@ -343,7 +337,7 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
name: Create arm64 Linux bundle
|
||||
runs-on:
|
||||
- hosted-linux-arm-1
|
||||
- buildjet-16vcpu-ubuntu-2204-arm
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
||||
needs: [linux_tests]
|
||||
env:
|
||||
@@ -354,26 +348,9 @@ jobs:
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
with:
|
||||
clean: false
|
||||
- name: "Setup jq"
|
||||
uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb # v2
|
||||
|
||||
- name: Set up Clang
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y llvm-15 clang-15 build-essential cmake pkg-config libasound2-dev libfontconfig-dev libwayland-dev libxkbcommon-x11-dev libssl-dev libsqlite3-dev libzstd-dev libvulkan1 libgit2-dev
|
||||
echo "/usr/lib/llvm-15/bin" >> $GITHUB_PATH
|
||||
|
||||
- uses: rui314/setup-mold@0bf4f07ef9048ec62a45f9dbf2f098afa49695f0 # v1
|
||||
with:
|
||||
mold-version: 2.32.0
|
||||
|
||||
- name: rustup
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Limit target directory size
|
||||
run: script/clear-target-dir-if-larger-than 100
|
||||
- name: Install Linux dependencies
|
||||
run: ./script/linux
|
||||
|
||||
- name: Determine version and release channel
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
|
||||
6
.github/workflows/deploy_collab.yml
vendored
6
.github/workflows/deploy_collab.yml
vendored
@@ -61,8 +61,7 @@ jobs:
|
||||
- style
|
||||
- tests
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- deploy
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Add Rust to the PATH
|
||||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
@@ -92,8 +91,7 @@ jobs:
|
||||
needs:
|
||||
- publish
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- deploy
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
|
||||
steps:
|
||||
- name: Sign into Kubernetes
|
||||
|
||||
3
.github/workflows/randomized_tests.yml
vendored
3
.github/workflows/randomized_tests.yml
vendored
@@ -19,8 +19,7 @@ jobs:
|
||||
tests:
|
||||
name: Run randomized tests
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- randomized-tests
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
||||
|
||||
3
.github/workflows/release_nightly.yml
vendored
3
.github/workflows/release_nightly.yml
vendored
@@ -100,8 +100,7 @@ jobs:
|
||||
name: Create a Linux *.tar.gz bundle for x86
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- deploy
|
||||
- buildjet-16vcpu-ubuntu-2204
|
||||
needs: tests
|
||||
env:
|
||||
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -14197,7 +14197,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zed"
|
||||
version = "0.153.0"
|
||||
version = "0.153.6"
|
||||
dependencies = [
|
||||
"activity_indicator",
|
||||
"anyhow",
|
||||
|
||||
@@ -104,7 +104,7 @@ pub enum ChannelRole {
|
||||
/// Admin can read/write and change permissions.
|
||||
#[sea_orm(string_value = "admin")]
|
||||
Admin,
|
||||
/// Member can read/write, but not change pemissions.
|
||||
/// Member can read/write, but not change permissions.
|
||||
#[sea_orm(string_value = "member")]
|
||||
#[default]
|
||||
Member,
|
||||
|
||||
@@ -337,7 +337,7 @@ impl InlayHintCache {
|
||||
/// If needed, queries LSP for new inlay hints, using the invalidation strategy given.
|
||||
/// To reduce inlay hint jumping, attempts to query a visible range of the editor(s) first,
|
||||
/// followed by the delayed queries of the same range above and below the visible one.
|
||||
/// This way, concequent refresh invocations are less likely to trigger LSP queries for the invisible ranges.
|
||||
/// This way, subsequent refresh invocations are less likely to trigger LSP queries for the invisible ranges.
|
||||
pub(super) fn spawn_hint_refresh(
|
||||
&mut self,
|
||||
reason_description: &'static str,
|
||||
|
||||
@@ -204,7 +204,8 @@ impl App {
|
||||
|
||||
type Handler = Box<dyn FnMut(&mut AppContext) -> bool + 'static>;
|
||||
type Listener = Box<dyn FnMut(&dyn Any, &mut AppContext) -> bool + 'static>;
|
||||
type KeystrokeObserver = Box<dyn FnMut(&KeystrokeEvent, &mut WindowContext) + 'static>;
|
||||
pub(crate) type KeystrokeObserver =
|
||||
Box<dyn FnMut(&KeystrokeEvent, &mut WindowContext) -> bool + 'static>;
|
||||
type QuitHandler = Box<dyn FnOnce(&mut AppContext) -> LocalBoxFuture<'static, ()> + 'static>;
|
||||
type ReleaseListener = Box<dyn FnOnce(&mut dyn Any, &mut AppContext) + 'static>;
|
||||
type NewViewListener = Box<dyn FnMut(AnyView, &mut WindowContext) + 'static>;
|
||||
@@ -1050,7 +1051,7 @@ impl AppContext {
|
||||
/// and that this API will not be invoked if the event's propagation is stopped.
|
||||
pub fn observe_keystrokes(
|
||||
&mut self,
|
||||
f: impl FnMut(&KeystrokeEvent, &mut WindowContext) + 'static,
|
||||
mut f: impl FnMut(&KeystrokeEvent, &mut WindowContext) + 'static,
|
||||
) -> Subscription {
|
||||
fn inner(
|
||||
keystroke_observers: &mut SubscriberSet<(), KeystrokeObserver>,
|
||||
@@ -1060,7 +1061,14 @@ impl AppContext {
|
||||
activate();
|
||||
subscription
|
||||
}
|
||||
inner(&mut self.keystroke_observers, Box::new(f))
|
||||
|
||||
inner(
|
||||
&mut self.keystroke_observers,
|
||||
Box::new(move |event, cx| {
|
||||
f(event, cx);
|
||||
true
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
/// Register key bindings.
|
||||
|
||||
@@ -4,16 +4,17 @@ use crate::{
|
||||
Context, Corners, CursorStyle, Decorations, DevicePixels, DispatchActionListener,
|
||||
DispatchNodeId, DispatchTree, DisplayId, Edges, Effect, Entity, EntityId, EventEmitter,
|
||||
FileDropEvent, Flatten, FontId, GPUSpecs, Global, GlobalElementId, GlyphId, Hsla, InputHandler,
|
||||
IsZero, KeyBinding, KeyContext, KeyDownEvent, KeyEvent, Keystroke, KeystrokeEvent, LayoutId,
|
||||
LineLayoutIndex, Model, ModelContext, Modifiers, ModifiersChangedEvent, MonochromeSprite,
|
||||
MouseButton, MouseEvent, MouseMoveEvent, MouseUpEvent, Path, Pixels, PlatformAtlas,
|
||||
PlatformDisplay, PlatformInput, PlatformInputHandler, PlatformWindow, Point, PolychromeSprite,
|
||||
PromptLevel, Quad, Render, RenderGlyphParams, RenderImage, RenderImageParams, RenderSvgParams,
|
||||
Replay, ResizeEdge, ScaledPixels, Scene, Shadow, SharedString, Size, StrikethroughStyle, Style,
|
||||
SubscriberSet, Subscription, TaffyLayoutEngine, Task, TextStyle, TextStyleRefinement,
|
||||
TransformationMatrix, Underline, UnderlineStyle, View, VisualContext, WeakView,
|
||||
WindowAppearance, WindowBackgroundAppearance, WindowBounds, WindowControls, WindowDecorations,
|
||||
WindowOptions, WindowParams, WindowTextSystem, SUBPIXEL_VARIANTS,
|
||||
IsZero, KeyBinding, KeyContext, KeyDownEvent, KeyEvent, Keystroke, KeystrokeEvent,
|
||||
KeystrokeObserver, LayoutId, LineLayoutIndex, Model, ModelContext, Modifiers,
|
||||
ModifiersChangedEvent, MonochromeSprite, MouseButton, MouseEvent, MouseMoveEvent, MouseUpEvent,
|
||||
Path, Pixels, PlatformAtlas, PlatformDisplay, PlatformInput, PlatformInputHandler,
|
||||
PlatformWindow, Point, PolychromeSprite, PromptLevel, Quad, Render, RenderGlyphParams,
|
||||
RenderImage, RenderImageParams, RenderSvgParams, Replay, ResizeEdge, ScaledPixels, Scene,
|
||||
Shadow, SharedString, Size, StrikethroughStyle, Style, SubscriberSet, Subscription,
|
||||
TaffyLayoutEngine, Task, TextStyle, TextStyleRefinement, TransformationMatrix, Underline,
|
||||
UnderlineStyle, View, VisualContext, WeakView, WindowAppearance, WindowBackgroundAppearance,
|
||||
WindowBounds, WindowControls, WindowDecorations, WindowOptions, WindowParams, WindowTextSystem,
|
||||
SUBPIXEL_VARIANTS,
|
||||
};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use collections::{FxHashMap, FxHashSet};
|
||||
@@ -1043,8 +1044,7 @@ impl<'a> WindowContext<'a> {
|
||||
action: action.as_ref().map(|action| action.boxed_clone()),
|
||||
},
|
||||
self,
|
||||
);
|
||||
true
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4250,6 +4250,36 @@ impl<'a, V: 'static> ViewContext<'a, V> {
|
||||
subscription
|
||||
}
|
||||
|
||||
/// Register a callback to be invoked when a keystroke is received by the application
|
||||
/// in any window. Note that this fires after all other action and event mechanisms have resolved
|
||||
/// and that this API will not be invoked if the event's propagation is stopped.
|
||||
pub fn observe_keystrokes(
|
||||
&mut self,
|
||||
mut f: impl FnMut(&mut V, &KeystrokeEvent, &mut ViewContext<V>) + 'static,
|
||||
) -> Subscription {
|
||||
fn inner(
|
||||
keystroke_observers: &mut SubscriberSet<(), KeystrokeObserver>,
|
||||
handler: KeystrokeObserver,
|
||||
) -> Subscription {
|
||||
let (subscription, activate) = keystroke_observers.insert((), handler);
|
||||
activate();
|
||||
subscription
|
||||
}
|
||||
|
||||
let view = self.view.downgrade();
|
||||
inner(
|
||||
&mut self.keystroke_observers,
|
||||
Box::new(move |event, cx| {
|
||||
if let Some(view) = view.upgrade() {
|
||||
view.update(cx, |view, cx| f(view, event, cx));
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
/// Register a callback to be invoked when the window's pending input changes.
|
||||
pub fn observe_pending_input(
|
||||
&mut self,
|
||||
|
||||
@@ -3022,7 +3022,7 @@ impl BufferSnapshot {
|
||||
let mut start = text.len();
|
||||
let end = start + buffer_range.len();
|
||||
|
||||
// When multiple names are captured, then the matcheable text
|
||||
// When multiple names are captured, then the matchable text
|
||||
// includes the whitespace in between the names.
|
||||
if !name_ranges.is_empty() {
|
||||
start -= 1;
|
||||
|
||||
@@ -392,7 +392,7 @@ async fn test_normalize_whitespace(cx: &mut gpui::TestAppContext) {
|
||||
let buffer = cx.new_model(|cx| Buffer::local(text, cx));
|
||||
|
||||
// Spawn a task to format the buffer's whitespace.
|
||||
// Pause so that the foratting task starts running.
|
||||
// Pause so that the formatting task starts running.
|
||||
let format = buffer.update(cx, |buffer, cx| buffer.remove_trailing_whitespace(cx));
|
||||
smol::future::yield_now().await;
|
||||
|
||||
|
||||
@@ -370,7 +370,11 @@ pub fn count_open_ai_tokens(
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
|
||||
if let open_ai::Model::Custom { .. } = model {
|
||||
tiktoken_rs::num_tokens_from_messages("gpt-4", &messages)
|
||||
} else {
|
||||
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
|
||||
}
|
||||
})
|
||||
.boxed()
|
||||
}
|
||||
@@ -487,7 +491,7 @@ impl ConfigurationView {
|
||||
|
||||
impl Render for ConfigurationView {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
const OPENAI_CONSOLE_URL: &str = "https://console.anthropic.com/settings/keys";
|
||||
const OPENAI_CONSOLE_URL: &str = "https://platform.openai.com/api-keys";
|
||||
const INSTRUCTIONS: [&str; 6] = [
|
||||
"To use the assistant panel or inline assistant, you need to add your OpenAI API key.",
|
||||
" - You can create an API key at: ",
|
||||
|
||||
@@ -521,7 +521,6 @@ impl ContextProvider for GoContextProvider {
|
||||
command: "go".into(),
|
||||
args: vec![
|
||||
"test".into(),
|
||||
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
"-run".into(),
|
||||
format!("^{}\\$", VariableName::Symbol.template_value(),),
|
||||
],
|
||||
@@ -532,7 +531,7 @@ impl ContextProvider for GoContextProvider {
|
||||
TaskTemplate {
|
||||
label: format!("go test {}", GO_PACKAGE_TASK_VARIABLE.template_value()),
|
||||
command: "go".into(),
|
||||
args: vec!["test".into(), GO_PACKAGE_TASK_VARIABLE.template_value()],
|
||||
args: vec!["test".into()],
|
||||
cwd: package_cwd.clone(),
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
@@ -574,7 +573,6 @@ impl ContextProvider for GoContextProvider {
|
||||
command: "go".into(),
|
||||
args: vec![
|
||||
"test".into(),
|
||||
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
"-benchmem".into(),
|
||||
"-run=^$".into(),
|
||||
"-bench".into(),
|
||||
|
||||
@@ -58,7 +58,11 @@ fn typescript_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
|
||||
}
|
||||
|
||||
fn eslint_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
|
||||
vec![server_path.into(), "--stdio".into()]
|
||||
vec![
|
||||
"--max-old-space-size=8192".into(),
|
||||
server_path.into(),
|
||||
"--stdio".into(),
|
||||
]
|
||||
}
|
||||
|
||||
pub struct TypeScriptLspAdapter {
|
||||
|
||||
@@ -7,14 +7,14 @@ use lsp::{CodeActionKind, LanguageServerBinary};
|
||||
use node_runtime::NodeRuntime;
|
||||
use project::project_settings::{BinarySettings, ProjectSettings};
|
||||
use serde_json::{json, Value};
|
||||
use settings::Settings;
|
||||
use settings::{Settings, SettingsLocation};
|
||||
use std::{
|
||||
any::Any,
|
||||
ffi::OsString,
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
};
|
||||
use util::{maybe, ResultExt};
|
||||
use util::{maybe, merge_json_value_into, ResultExt};
|
||||
|
||||
fn typescript_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
|
||||
vec![server_path.into(), "--stdio".into()]
|
||||
@@ -274,17 +274,29 @@ impl LspAdapter for VtslsLspAdapter {
|
||||
cx: &mut AsyncAppContext,
|
||||
) -> Result<Value> {
|
||||
let override_options = cx.update(|cx| {
|
||||
ProjectSettings::get_global(cx)
|
||||
.lsp
|
||||
.get(SERVER_NAME)
|
||||
.and_then(|s| s.initialization_options.clone())
|
||||
ProjectSettings::get(
|
||||
Some(SettingsLocation {
|
||||
worktree_id: adapter.worktree_id(),
|
||||
path: adapter.worktree_root_path(),
|
||||
}),
|
||||
cx,
|
||||
)
|
||||
.lsp
|
||||
.get(SERVER_NAME)
|
||||
.and_then(|s| s.initialization_options.clone())
|
||||
})?;
|
||||
if let Some(options) = override_options {
|
||||
return Ok(options);
|
||||
}
|
||||
self.initialization_options(adapter)
|
||||
let mut initialization_options = self
|
||||
.initialization_options(adapter)
|
||||
.await
|
||||
.map(|o| o.unwrap())
|
||||
.map(|o| o.unwrap())?;
|
||||
|
||||
if let Some(override_options) = override_options {
|
||||
merge_json_value_into(override_options, &mut initialization_options)
|
||||
}
|
||||
Ok(initialization_options)
|
||||
}
|
||||
|
||||
fn language_ids(&self) -> HashMap<String, String> {
|
||||
|
||||
@@ -509,7 +509,7 @@ impl<D: PickerDelegate> Picker<D> {
|
||||
.on_mouse_up(
|
||||
MouseButton::Right,
|
||||
cx.listener(move |this, event: &MouseUpEvent, cx| {
|
||||
// We specficially want to use the platform key here, as
|
||||
// We specifically want to use the platform key here, as
|
||||
// ctrl will already be held down for the tab switcher.
|
||||
this.handle_click(ix, event.modifiers.platform, cx)
|
||||
}),
|
||||
|
||||
@@ -219,7 +219,7 @@ async fn load_shell_environment(
|
||||
);
|
||||
|
||||
let output = smol::process::Command::new(&shell)
|
||||
.args(["-i", "-c", &command])
|
||||
.args(["-l", "-i", "-c", &command])
|
||||
.envs(direnv_environment)
|
||||
.output()
|
||||
.await
|
||||
|
||||
@@ -1619,7 +1619,7 @@ fn task_summary(task: &TaskState, error_code: Option<i32>) -> (bool, String, Str
|
||||
/// the cursor's `point` is not updated to the new line and column values
|
||||
///
|
||||
/// * ??? there could be more consequences, and any further "proper" streaming from the PTY might bug and/or panic.
|
||||
/// Still, concequent `append_text_to_term` invocations are possible and display the contents correctly.
|
||||
/// Still, subsequent `append_text_to_term` invocations are possible and display the contents correctly.
|
||||
///
|
||||
/// Despite the quirks, this is the simplest approach to appending text to the terminal: its alternative, `grid_mut` manipulations,
|
||||
/// do not properly set the scrolling state and display odd text after appending; also those manipulations are more tedious and error-prone.
|
||||
|
||||
@@ -45,7 +45,7 @@ impl RenderOnce for AnyIcon {
|
||||
/// The decoration for an icon.
|
||||
///
|
||||
/// For example, this can show an indicator, an "x",
|
||||
/// or a diagonal strkethrough to indicate something is disabled.
|
||||
/// or a diagonal strikethrough to indicate something is disabled.
|
||||
#[derive(Debug, PartialEq, Copy, Clone, EnumIter)]
|
||||
pub enum IconDecoration {
|
||||
Strikethrough,
|
||||
|
||||
@@ -644,7 +644,7 @@ impl<T: Ord + Clone> RangeExt<T> for RangeInclusive<T> {
|
||||
/// This is useful for turning regular alphanumerically sorted sequences as `1-abc, 10, 11-def, .., 2, 21-abc`
|
||||
/// into `1-abc, 2, 10, 11-def, .., 21-abc`
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct NumericPrefixWithSuffix<'a>(Option<u32>, &'a str);
|
||||
pub struct NumericPrefixWithSuffix<'a>(Option<u64>, &'a str);
|
||||
|
||||
impl<'a> NumericPrefixWithSuffix<'a> {
|
||||
pub fn from_numeric_prefixed_str(str: &'a str) -> Self {
|
||||
|
||||
@@ -24,7 +24,7 @@ use editor::{
|
||||
};
|
||||
use gpui::{
|
||||
actions, impl_actions, Action, AppContext, Entity, EventEmitter, KeyContext, KeystrokeEvent,
|
||||
Render, View, ViewContext, WeakView,
|
||||
Render, Subscription, View, ViewContext, WeakView,
|
||||
};
|
||||
use insert::NormalBefore;
|
||||
use language::{CursorShape, Point, Selection, SelectionGoal, TransactionId};
|
||||
@@ -166,6 +166,8 @@ pub(crate) struct Vim {
|
||||
pub search: SearchState,
|
||||
|
||||
editor: WeakView<Editor>,
|
||||
|
||||
_subscriptions: Vec<Subscription>,
|
||||
}
|
||||
|
||||
// Hack: Vim intercepts events dispatched to a window and updates the view in response.
|
||||
@@ -189,36 +191,32 @@ impl Vim {
|
||||
pub fn new(cx: &mut ViewContext<Editor>) -> View<Self> {
|
||||
let editor = cx.view().clone();
|
||||
|
||||
cx.new_view(|cx: &mut ViewContext<Vim>| {
|
||||
cx.subscribe(&editor, |vim, _, event, cx| {
|
||||
vim.handle_editor_event(event, cx)
|
||||
})
|
||||
.detach();
|
||||
cx.new_view(|cx| Vim {
|
||||
mode: Mode::Normal,
|
||||
last_mode: Mode::Normal,
|
||||
pre_count: None,
|
||||
post_count: None,
|
||||
operator_stack: Vec::new(),
|
||||
replacements: Vec::new(),
|
||||
|
||||
let listener = cx.listener(Vim::observe_keystrokes);
|
||||
cx.observe_keystrokes(listener).detach();
|
||||
marks: HashMap::default(),
|
||||
stored_visual_mode: None,
|
||||
change_list: Vec::new(),
|
||||
change_list_position: None,
|
||||
current_tx: None,
|
||||
current_anchor: None,
|
||||
undo_modes: HashMap::default(),
|
||||
|
||||
Vim {
|
||||
mode: Mode::Normal,
|
||||
last_mode: Mode::Normal,
|
||||
pre_count: None,
|
||||
post_count: None,
|
||||
operator_stack: Vec::new(),
|
||||
replacements: Vec::new(),
|
||||
selected_register: None,
|
||||
search: SearchState::default(),
|
||||
|
||||
marks: HashMap::default(),
|
||||
stored_visual_mode: None,
|
||||
change_list: Vec::new(),
|
||||
change_list_position: None,
|
||||
current_tx: None,
|
||||
current_anchor: None,
|
||||
undo_modes: HashMap::default(),
|
||||
|
||||
selected_register: None,
|
||||
search: SearchState::default(),
|
||||
|
||||
editor: editor.downgrade(),
|
||||
}
|
||||
editor: editor.downgrade(),
|
||||
_subscriptions: vec![
|
||||
cx.observe_keystrokes(Self::observe_keystrokes),
|
||||
cx.subscribe(&editor, |this, _, event, cx| {
|
||||
this.handle_editor_event(event, cx)
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1364,6 +1364,9 @@ impl Pane {
|
||||
self.activation_history
|
||||
.retain(|entry| entry.entity_id != self.items[item_index].item_id());
|
||||
|
||||
if self.is_tab_pinned(item_index) {
|
||||
self.pinned_tab_count -= 1;
|
||||
}
|
||||
if item_index == self.active_item_index {
|
||||
let index_to_activate = self
|
||||
.activation_history
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
description = "The fast, collaborative code editor."
|
||||
edition = "2021"
|
||||
name = "zed"
|
||||
version = "0.153.0"
|
||||
version = "0.153.6"
|
||||
publish = false
|
||||
license = "GPL-3.0-or-later"
|
||||
authors = ["Zed Team <hi@zed.dev>"]
|
||||
|
||||
@@ -1 +1 @@
|
||||
dev
|
||||
stable
|
||||
@@ -176,7 +176,7 @@ pub fn monitor_main_thread_hangs(
|
||||
let background_executor = cx.background_executor();
|
||||
let telemetry_settings = *client::TelemetrySettings::get_global(cx);
|
||||
|
||||
// Initialize SIGUSR2 handler to send a backrace to a channel.
|
||||
// Initialize SIGUSR2 handler to send a backtrace to a channel.
|
||||
let (backtrace_tx, backtrace_rx) = mpsc::channel();
|
||||
static BACKTRACE: Mutex<Vec<backtrace::Frame>> = Mutex::new(Vec::new());
|
||||
static BACKTRACE_SENDER: OnceLock<mpsc::Sender<()>> = OnceLock::new();
|
||||
|
||||
11
script/check-spelling
Executable file
11
script/check-spelling
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
TYPOS_CLI_VERSION=1.24.6
|
||||
|
||||
if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; then
|
||||
echo "Installing typos-cli@$TYPOS_CLI_VERSION..."
|
||||
cargo install "typos-cli@$TYPOS_CLI_VERSION"
|
||||
else
|
||||
echo "typos-cli@$TYPOS_CLI_VERSION is already installed."
|
||||
fi
|
||||
typos
|
||||
@@ -32,6 +32,7 @@ if [[ -n $apt ]]; then
|
||||
elfutils
|
||||
libsqlite3-dev
|
||||
)
|
||||
$maysudo "$apt" update
|
||||
$maysudo "$apt" install -y "${deps[@]}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user