Nathan Sobo
85a076312a
Merge branch 'main' into theme-variables
2021-08-04 16:47:43 -06:00
Nathan Sobo and Max Brunsfeld
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
Max Brunsfeld and Nathan Sobo
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
Nathan Sobo and Antonio Scandurra
6efadd19dd
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Max Brunsfeld and Nathan Sobo
f9e13f3429
Start work on WrapMap::chunks_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:23:56 -07: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
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
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
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02: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 and Antonio Scandurra
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
5673f116c9
Add a platform API for accessing the keychain
2021-06-08 17:44:45 -07:00
Max Brunsfeld and Nathan Sobo
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 and Max Brunsfeld
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 and Max Brunsfeld
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 and Max Brunsfeld
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 and Max Brunsfeld
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 and Nathan Sobo
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
Nathan Sobo
2c122eb253
Fix typo
2021-05-21 14:36:44 -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
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
048bbc9da0
Test prompting when saving while there's a conflict
2021-05-12 15:21:50 +02:00
Antonio Scandurra
62403343fa
Display prompt when trying to save a conflicting file
2021-05-12 11:54:48 +02:00
Antonio Scandurra and Nathan Sobo
e72a309734
Add a basic tab keybinding
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-11 17:10:37 +02: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
3120906275
Merge branch 'master' into close-window
2021-05-07 14:24:48 -07:00
Max Brunsfeld
e6323f0d02
Fix handling of new files with new buffer/file structure
2021-05-06 21:06:20 -07: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
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 and Antonio Scandurra
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 and Max Brunsfeld
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 and Antonio Scandurra
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
Antonio Scandurra
cf23b0e4a2
Prompt for paths asynchronously to avoid double borrow
2021-04-14 16:30:03 +02:00
Max Brunsfeld
c83f02dd04
Implement multi-selection copy/cut/paste
2021-04-13 17:28:51 -07:00
Antonio Scandurra and Max Brunsfeld
13514aae6c
Allow metadata to be associated with text written to clipboard
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-04-13 19:03:56 +02:00
Antonio Scandurra
f4c1ffc329
Start on copy-paste
2021-04-13 14:58:10 +02:00
Max Brunsfeld and Nathan Sobo
d4436f3018
Don't try to handle errors when opening platform windows
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-12 15:14:25 -07:00
Max Brunsfeld and Nathan Sobo
3247f49954
Allow menu items to specify arguments for their commands
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-12 14:09:49 -07:00