Nathan Sobo
541f58e12c
Start on subscribing to messages in channel entity instances
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-18 11:45:29 -06:00
Nathan Sobo
149fb574c7
Expose titlebar_height in LayoutContext
2021-08-06 09:11:16 -06:00
Nathan Sobo
e16c62ed0e
Add platform::Window::titlebar_height
2021-08-06 09:08:29 -06:00
Nathan Sobo
34eb2c446f
Start on custom titlebar
2021-08-05 11:48:35 -06:00
Max Brunsfeld
d37a98782e
Improve border parsing in themes
...
The `top`, `left`, `bottom` and `right` fields are optional.
If none are specified, then they are all set to true.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 17:19:42 -07:00
Nathan Sobo
85a076312a
Merge branch 'main' into theme-variables
2021-08-04 16:47:43 -06:00
Max Brunsfeld
802f1f4e78
Get new theme structure working
...
* Fix precedence of extends directives
* Always group color with font properties for text theming
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 14:07:19 -07:00
Nathan Sobo
56354c7623
Avoid crashes when laying out lines containing byte order marks
...
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 11:52:21 -06:00
Nathan Sobo
90b51c3356
Implement themes::ThemeRegistry::get
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 19:35:15 -06:00
Max Brunsfeld
81041d7841
Restructure Theme with new style objects
2021-08-03 13:36:58 -07:00
Max Brunsfeld
ef0ffbe819
Use custom color wrapper type everywhere in gpui & zed
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-03 12:48:58 -07:00
Max Brunsfeld
fa01273466
Extract {Container,Label}Style structs from those elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-03 11:07:03 -07:00
Nathan Sobo
4c53470800
Notify all views when a theme is selected
2021-08-02 16:57:10 -06:00
Max Brunsfeld
b30d0daabf
Add a theme picker
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max Brunsfeld
e080739d57
Remove use of replace_with crate for managing element lifecycles
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 13:11:11 -07:00
Max Brunsfeld
8785f1f9c6
Use deterministic executor in randomized synchronous tests
...
Remove App::test function
2021-07-30 14:07:37 -07:00
Max Brunsfeld
4c3f97d123
Fix type of Workspace::open_new_file context parameter
...
Fixes #118
2021-07-30 10:11:46 -07:00
Max Brunsfeld
372d2ccb6d
Extract most colors in codebase into theme file. switch to dark
2021-07-30 09:50:28 -07:00
Nathan Sobo
6efadd19dd
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Antonio Scandurra
b647e3ee71
Make WrapMap
and DisplayMap
models
...
This removes the need for a lock around in `WrapMap` and also removes
`WrapMap::notifications` because gpui already has a standard way of
notifying when a model updates.
2021-07-26 13:02:31 +02:00
Nathan Sobo
f81f043058
WIP
2021-07-23 12:25:09 -06:00
Nathan Sobo
11285f3762
Pass a MutableAppContext to Element::layout and ::dispatch_event
...
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-23 10:52:08 -06:00
Antonio Scandurra
502f54a021
Don't poll foreground futures during DeterministicExecutor::block_on
2021-07-23 12:06:58 +02:00
Max Brunsfeld
5d22c6c4bd
Start restructuring WrapMap with simpler concurrency
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-22 16:21:42 -07:00
Max Brunsfeld
d0fdc7b5e8
Get simple unit test passing for soft-wrap in DisplayMap
2021-07-20 15:22:11 -07:00
Max Brunsfeld
61397f2f2f
Avoid holding executor's state lock while parked
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-20 11:37:02 -07:00
Nathan Sobo
ee213696aa
Replace DeterministicExecutor::reset with forbid_parking
...
There's really no point calling reset if we plan on parking afterwards.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-20 12:28:04 -06:00
Nathan Sobo
64927abbc4
Allow DeterministicExecutor to park until forbid_parking is called
...
This allows us to perform async setup such as talking to the database.
2021-07-20 12:22:02 -06:00
Antonio Scandurra
3d3a14b650
Add DeterministicExecutor::block_on(duration, future)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-20 19:20:50 +02:00
Max Brunsfeld
f9e13f3429
Start work on WrapMap::chunks_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-19 16:23:56 -07:00
Nathan Sobo
e193a660aa
WIP
2021-07-19 13:59:07 -06:00
Max Brunsfeld
05e5e5f747
Implement FontSystem::wrap_line
2021-07-16 17:14:43 -07:00
Antonio Scandurra
9895c77f5c
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-16 17:53:23 +02:00
Antonio Scandurra
2e645bcf6a
Use an unbounded channel for waking executor::Deterministic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-13 18:46:48 +02:00
Antonio Scandurra
c4e37dc47c
Use the same background executor for spawning CPU intensive tasks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-13 18:13:25 +02:00
Antonio Scandurra
f836a25500
Use an executor::Background
in AppContext::thread_pool
2021-07-13 14:06:38 +02:00
Antonio Scandurra
68f747d6df
Allow printing a trace of a run of the executor
2021-07-13 12:31:36 +02:00
Nathan Sobo
1537500fcb
Include contents of the zed-server repo
...
We're going full monorepo.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-12 14:14:39 -06:00
Antonio Scandurra
58bae3a9a7
Ensure root view is always rendered when opening a window
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-12 17:44:10 +02:00
Antonio Scandurra
1813a3cc91
Allow resetting executor::Deterministic
's RNG
2021-07-11 11:26:06 +02:00
Max Brunsfeld
eeebc761b6
Restructure Peer to handle connections' messages in order
2021-07-09 16:27:34 -07:00
Antonio Scandurra
4f4233e00b
Schedule foreground-spawned futures sequentially
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-09 18:55:42 +02:00
Antonio Scandurra
13c56cf6ce
WIP
2021-07-09 18:32:57 +02:00
Antonio Scandurra
102026f3c7
Implement a scoped pool on executor::Background
2021-07-09 15:00:51 +02:00
Max Brunsfeld
2965fce70d
Avoid panic when spawn is called after run exits in deterministic executor
2021-07-08 17:38:54 -07:00
Max Brunsfeld
140c8833fe
Start work on a deterministic executor for tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-08 13:39:24 -07:00
Antonio Scandurra
792926c675
Merge pull request #100 from zed-industries/fix-url-to-path-conversion
...
Fix URL to `PathBuf` conversion in `mac::Platform`
2021-07-08 17:51:09 +02:00
Max Brunsfeld
f46c0a790e
Improve support for gpui tests that need multiple contexts
...
If a test function takes multiple contexts, pass it however many
distinct contexts are needed. Construct each one with a different
starting entity id so that they do not share any entity ids.
2021-07-07 17:18:42 -07:00
Antonio Scandurra
75fc371f36
Ensure returned URLs are files before returning them in path prompts
2021-07-06 16:08:19 +02:00
Antonio Scandurra
ed1eb24ee2
Convert URLs to paths returned from NSSavePanel
using [Url path]
2021-07-06 15:54:42 +02:00
Antonio Scandurra
39d3b21780
Convert URLs to paths returned from NSOpenPanel
using [Url path]
2021-07-06 15:54:29 +02:00
Max Brunsfeld
58eefcd331
Add ModelHandle::spawn_weak, fix worktree leak from spawn call
2021-07-05 17:55:52 -07:00
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02:00
Nathan Sobo
2257abd7dd
Add Entity release hooks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-25 10:35:06 -06:00
Nathan Sobo
8f7111b0f7
Upgrade bindgen to fix warnings on new Rust
2021-06-24 18:02:53 -06:00
Nathan Sobo
3d67266d0b
Add a "retries" option to gpui::test macro and use it in flaky tests
2021-06-24 17:51:16 -06:00
Max Brunsfeld
ce2f3f664a
Consolidate more logic for joining worktree in Worktree::remote
...
This way we can use this method in tests and avoid
needing to construct a Workspace.
2021-06-23 18:07:09 -07:00
Max Brunsfeld
6a166554e8
Add public method for connecting to RPC server with a given address
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-23 18:05:03 -07:00
Max Brunsfeld
a57cb2b189
Add a public gpui::TestAppContext::new method
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-23 16:34:36 -07:00
Max Brunsfeld
dc8e216fcb
WIP - Maintain a set of open buffers on a LocalWorktree
2021-06-22 12:29:58 -07:00
Max Brunsfeld
cabf6b1f58
Emit a diff event when worktree's snapshot is updated
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-21 17:07:56 -07:00
Max Brunsfeld
7a88e44264
Add menu command to join worktree using URL on clipboard
...
Introduce rpc::Client struct that wraps zed_rpc::Peer
2021-06-17 20:42:36 -07:00
Max Brunsfeld
531443dc9c
Don't generate bindgen layout tests
2021-06-17 15:20:12 -07:00
Antonio Scandurra
8112efd522
Replace callback-based requests/messages with streams
2021-06-16 14:26:54 +02:00
Max Brunsfeld
8b66e0aa7e
WIP - Allow RpcClient to register handlers for incoming messages
2021-06-15 17:22:48 -07:00
Antonio Scandurra
3e391c0785
Move worktree sharing down into Workspace
...
This will make it easier to pick a worktree and give it an `RpcClient`.
2021-06-15 15:14:17 +02:00
Max Brunsfeld
86ff599285
Use tiny_http for handling login HTTP request
...
Our manual HTTP parsing and encoding was not working with Safari.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-06-11 10:28:00 -07:00
Max Brunsfeld
71d64a837e
Avoid crash when user denies keychain access
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-06-11 09:47:24 -07:00
Max Brunsfeld
20542f54ef
Start work on connecting to RPC endpoint
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-06-10 22:12:04 -07:00
Nathan Sobo
66c76d5469
Test creating a new empty workspace and fix test compile errors
2021-06-09 16:38:32 -06:00
Max Brunsfeld
5673f116c9
Add a platform API for accessing the keychain
2021-06-08 17:44:45 -07:00
Max Brunsfeld
db3e01a12c
Start work on a login command
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-07 18:15:11 -07:00
Nathan Sobo
3a932cc9bf
Rename MainThreadPlatform to ForegroundPlatform and fix crash on quit
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:42:49 -06:00
Nathan Sobo
6daddf5146
Allow platform references to be sent to background threads
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:35:27 -06:00
Nathan Sobo
ebbe517bfa
Move path prompting methods to MainThreadPlatform
...
They need to call back into the main thread, meaning the callbacks can't be Send + Sync.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:32:03 -06:00
Nathan Sobo
7b98994d1f
Rename PlatformLifecycle to MainThreadPlatform
...
Don't love it, but at least it's accurate.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:21:34 -06:00
Nathan Sobo
14b519f78d
Extract a platform::Lifecycle trait
...
This will allow us to make platform::Platform be Send + Sync and keep the lifecycle on the main thread.
2021-06-07 17:02:24 -06:00
Max Brunsfeld
6ef447866a
Rename context parameters to cx
in gpui
2021-05-28 15:32:35 -07:00
Max Brunsfeld
139bcb8304
Rename foo/mod.rs
files too foo.rs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-28 14:41:58 -07:00
Antonio Scandurra
5485c1a749
Add test for font selection
2021-05-26 09:41:57 +02:00
Max Brunsfeld
4e74a8726c
Bump context-predicate grammar to the latest Tree-sitter
2021-05-22 12:34:35 +02:00
Nathan Sobo
5d614e7e54
Fix test assertions
2021-05-21 14:36:52 -06:00
Nathan Sobo
2c122eb253
Fix typo
2021-05-21 14:36:44 -06:00
Nathan Sobo
b075b0108d
Clarify variable name
2021-05-21 14:14:05 -06:00
Nathan Sobo
92ff7f4e5e
Accept colors in styling runs passed to layout_str
...
Also move from the runs being expressed as ranges to the runs being expressed as a sequence of contiguous scalar lengths.
2021-05-21 14:10:38 -06:00
Antonio Scandurra
608336c279
Complete unit test for Label highlights
2021-05-20 12:47:08 +02:00
Max Brunsfeld
558ce41130
WIP - Adjust Label element to expect highlights as byte offsets
2021-05-20 12:47:08 +02:00
Max Brunsfeld
92b938f4a8
Adjust layout_str
to use byte coordinates
...
* Interpret ranges as byte ranges for incoming runs
* Return glyphs whose indices are byte offsets
2021-05-20 12:47:08 +02:00
Antonio Scandurra
d7f5587d84
Revert "Temporary: ensure CI env variable is being set"
...
This reverts commit 074dc55ab7
.
2021-05-19 15:20:33 +02:00
Antonio Scandurra
074dc55ab7
Temporary: ensure CI env variable is being set
2021-05-19 15:19:07 +02:00
Antonio Scandurra
65cf9b7c1d
Remove condition_with_duration
for ModelHandle
...
Also, use a 2s timeout on CI for both `ModelHandle::condition` and
`ViewHandle::condition`.
2021-05-19 14:50:28 +02:00
Antonio Scandurra
830fc38503
Increase condition
timeout on CI and remove condition_with_duration
...
`condition_with_duration` wasn't really being used, as the default
timeout was `500ms` and the only places that did use it specified
`500ms` as well.
2021-05-19 14:42:10 +02:00
Antonio Scandurra
a8ece757e4
Implement time::Global using a SmallVec
...
Version vectors are going to be small most of the time, especially
as soon as we introduce an optimization that will let us only
track concurrent versions, thus preventing the version vector from
growing indefinitely over time in the tree.
2021-05-18 17:34:48 +02:00
Max Brunsfeld
d76d532692
Merge branch 'master' into file-changed-on-disk
2021-05-12 20:08:09 -07:00
Max Brunsfeld
493643c15f
Remove dropped entities even if there are no effects to flush
2021-05-12 19:45:45 -07:00
Nathan Sobo
9dac491ed5
Don't remove entities whose ref count has become positive again
2021-05-12 19:29:17 -06:00
Nathan Sobo
e81a28e57e
Remove dropped entities after every effect
2021-05-12 19:28:48 -06:00
Max Brunsfeld
4910bc50c6
Merge branch 'master' into file-changed-on-disk
2021-05-12 16:20:03 -07:00
Max Brunsfeld
d6c89521d9
Remove commented-out tests for spawn and spawn_stream
2021-05-12 15:27:58 -07:00
Nathan Sobo
a3be5595dd
Pass a handle to the current view model when spawning
...
Most of the time, we'll want a way to get a reference back to the current view or model, so this facilitates that common case.
2021-05-12 15:28:59 -06:00
Nathan Sobo
fa6bd1f926
Introduce AsyncAppContext and simplify spawning
...
Now when you call spawn in various context, you pass an FnOnce that is called with an AsyncAppContext and returns a static future. This allows you to write async code similar to how our tests work, borrowing the guts of the AsyncAppContext when needed to interact, but using normal async await semantics instead of callbacks.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-12 15:16:49 -06:00
Antonio Scandurra
2326ac3dbf
Use gpui::test
for tests in gpui
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-05-12 18:21:32 +02:00
Antonio Scandurra
c7d97adf23
Introduce a gpui::test
macro
2021-05-12 17:05:03 +02:00
Antonio Scandurra
048bbc9da0
Test prompting when saving while there's a conflict
2021-05-12 15:21:50 +02:00
Antonio Scandurra
2eff936154
Make MutableAppContext::prompt
private
...
...as we're supposed to call this method only via ViewContext.
2021-05-12 11:57:05 +02:00
Antonio Scandurra
62403343fa
Display prompt when trying to save a conflicting file
2021-05-12 11:54:48 +02:00
Antonio Scandurra
e72a309734
Add a basic tab
keybinding
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-11 17:10:37 +02:00
Antonio Scandurra
d8eed53f13
Emit Dirtied
event when a clean buffer's file is deleted
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-11 16:32:52 +02:00
Max Brunsfeld
f2b009ea6b
Ensure that the bundle runs on macOS versions < 11.0
2021-05-10 14:14:04 -06:00
Nathan Sobo
76d9a40f35
Merge pull request #40 from zed-industries/close-window
...
Correctly handle closing windows and removing entities
2021-05-08 09:06:54 -06:00
Nathan Sobo
2c74d75687
Fix double borrow error in Window::on_close callbacks when quitting app
...
The simplest solution I could come up with was to make quitting the app asynchronous. Calling mac::Platform::quit enqueues a request to quit the app and then allows the call stack to fully return. This ensures we aren't holding a borrow when we quit and invoke all the Window::on_close callbacks. Seems like it should be fine to be async on quitting.
2021-05-08 08:49:14 -06:00
Max Brunsfeld
9dbda4551f
Ignore events for held-down keys after a key combo is partially released
2021-05-07 16:54:55 -07:00
Max Brunsfeld
b292baf334
Remove logging of retained views
2021-05-07 14:51:55 -07:00
Max Brunsfeld
3120906275
Merge branch 'master' into close-window
2021-05-07 14:24:48 -07:00
Max Brunsfeld
83a844f120
Fix the Clone impl for AnyViewHandle
2021-05-07 14:16:16 -07:00
Nathan Sobo
318e8abf2f
Avoid redundant entity refcount operations
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-05-07 14:15:43 -07:00
Max Brunsfeld
3c3cf3b7c5
Keep weak handles to workspace items
2021-05-07 09:52:15 -07:00
Nathan Sobo
b5f1f31693
Fix focus test
...
Call on_focus on the root view when the window is originally created. Test dropping a focused view. Simplify test to avoid relying on emitting events.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-05-07 09:43:07 -06:00
Max Brunsfeld
e6323f0d02
Fix handling of new files with new buffer/file structure
2021-05-06 21:06:20 -07:00
Nathan Sobo
35e0eaaae2
Refocus root view if focused view is removed
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 16:30:10 -06:00
Nathan Sobo
5e08a02ca8
Don't retain entities after EntityTasks are dropped
...
This allows us to spawn long-running tasks without leaking entities, but it also ensures that if we *do* hold on to a task, that the entity exists until the future or stream complete so that the task doesn't need to return an Option type.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 16:19:38 -06:00
Nathan Sobo
ab10e27424
Create a pending view handle before creating a view
...
This way, if we create and drop a handle during the creation of a view, we don't drop the view before we have a chance to increment its initial reference count.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:18:09 -06:00
Nathan Sobo
f408521d12
Gracefully handle a view being updated and removed in the same tick
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:13:26 -06:00
Max Brunsfeld
290fcb4c06
In handle ::condition, re-poll on events as well as notifications
2021-05-06 13:18:41 -07:00
Nathan Sobo
7717700b2c
Implement Drop on AnyViewHandle
...
This was a pretty bad oversight.
2021-05-05 23:21:39 -06:00
Nathan Sobo
6cb656db9a
Require window to have a root view and focused view
...
This is possible now that the window doesn't need to own the view. We can create the root view before we create the window.
2021-05-05 23:21:19 -06:00
Nathan Sobo
45a01d1526
Don't store views on windows
...
Instead, store all views in a single top-level map that's keyed by window id and view id. This ensures we'll keep a view alive even if its window is gone, so long as we're holding a handle. This can happen with things like spawned tasks. We don't want to panic during a spawned task after we close the window.
2021-05-05 22:48:16 -06:00
Max Brunsfeld
1fcbadaa99
Add TestAppContext::simulate_new_path_selection
2021-05-05 11:04:39 -07:00
Nathan Sobo
3f844bc953
Fix crash when closing windows
2021-05-05 11:34:49 -06:00
Max Brunsfeld
5fd084ec09
Start work on creating and saving new files
2021-05-04 19:04:11 -07:00
Nathan Sobo
ed28bd3f95
Combine Workspace and WorkspaceView
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-03 20:15:55 -06:00
Max Brunsfeld
5826a976ef
Return a future from WorkspaceView::open_paths
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-29 14:55:28 -07:00
Nathan Sobo
6b357a6ae7
Fix tests
...
I didn't realize a previous change had broken stuff. We need to always call `remove_dropped_entities` and `update_windows` in `flush_effects`, even if there aren't any effects. To achieve this, I use a `loop` to ensure we call these methods at least once before breaking.
2021-04-28 14:16:10 -06:00
Max Brunsfeld
21cfb75a73
Flush redundant fs events in worktree test
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-28 12:42:39 -07:00
Nathan Sobo
1cb3fdbf7d
Synthesize a mouse moved event in the previous position after painting a scene
...
This ensures that we correctly update the hover state of elements whose position has changed relative to the mouse cursor even though the mouse hasn't actually moved.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-28 13:02:39 -06:00
Nathan Sobo
b5463dcd1e
Close tabs when X is clicked
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-28 10:00:45 -06:00
Nathan Sobo
8c51bb253d
Render sprited icons at 2x resolution since we don't align to pixel grid
...
This provides the sampler with a bit more data when positioning sprites at subpixel positions.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-28 09:32:38 -06:00
Nathan Sobo
69cc2b0483
WIP
2021-04-27 18:35:24 -06:00
Nathan Sobo
58e336354e
Align close tab icon cleanly with unsaved indicator
2021-04-27 16:51:23 -06:00
Nathan Sobo
eca9f495a1
Render a close tab button on tab hover
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-27 11:58:59 -06:00
Nathan Sobo
bb95d58c79
Relay hover events to tabs
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-27 11:37:14 -06:00
Nathan Sobo
3d1e44ca29
Capture hover events on tabs
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-27 09:23:44 -06:00
Nathan Sobo
fc4b7e2a2a
Introduce MouseEventHandler
...
Still need to give elements the ability to re-render their parent view. Once that is in place, I think we can implement hoverable close tab buttons.
2021-04-26 21:52:18 -06:00
Nathan Sobo
a47b0b4ca6
Add a mechanism for storing ephemeral values
...
I'll use this in the mouse event handler to track hover and click state.
2021-04-26 21:24:23 -06:00
Max Brunsfeld
55fcc586bc
Cancel outstanding fuzzy-matching calls before starting a new one
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-26 16:14:43 -07:00
Max Brunsfeld
09f5c7c23e
Fix scrollwheel events in uniformlist
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-26 15:53:38 -07:00
Max Brunsfeld
9fd8acdce7
Use our own scoped_pool implementation
2021-04-20 14:07:36 -07:00
Nathan Sobo
9899614f31
Remove task_done condvar which supported finish_pending_tasks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:45:42 -06:00
Nathan Sobo
1a8e909a38
Ensure we remove broadcast channels after all conditions resolve
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-20 10:43:13 -06:00