Kirill Bulatov
87e6651ecb
Fix hint tests, add a char boundary bug test
2023-08-14 16:01:02 +03:00
Kirill Bulatov
449c009639
Properly generate ranges to query
2023-08-14 11:25:02 +03:00
Kirill Bulatov
56f89739f8
Do not add duplicate hints to the cache
2023-08-14 11:25:02 +03:00
Kirill Bulatov
0e2a1fc149
Query inlay hints for parts of the file
2023-08-14 11:25:02 +03:00
Kirill Bulatov
708409e06d
Query hints on every scroll
2023-08-14 11:25:02 +03:00
Kirill Bulatov
5d2750e0d4
Hide inlay cache fields
2023-08-14 11:25:02 +03:00
Nathan Sobo
65123e6eed
Allow individual corner radii on drop shadows
2023-08-12 10:58:08 -06:00
Nathan Sobo
84dc4090bd
Wire up per corner radii for quad
...
Still need to expose this in the styling layer and allow images
to have per corner radii.
2023-08-12 10:40:23 -06:00
Piotr Osiewicz
ffffbbea1f
chore: use Cow instead of String for tooltips ( #2838 )
...
A QoL change to align `Tooltip` with other elements like `Label`
Release Notes:
- N/A
2023-08-11 15:29:55 +02:00
Nathan Sobo
db96fb1307
Merge remote-tracking branch 'origin/main' into paint-context
2023-08-08 18:27:16 -06:00
Nathan Sobo
54ca5f1d44
Replace context methods that take a window id with methods on window handles ( #2832 )
...
With this PR, I've eliminated almost all references to window ids
outside of the internals of GPUI. All public methods taking these ids
are now defined on `AnyWindowHandle`, which provides a more coherent
narrative around windows as a concept.
2023-08-08 17:51:37 -06:00
Piotr Osiewicz
1aff642981
Do not highlgiht selections at all over the threshold
2023-08-08 13:09:27 +02:00
Nathan Sobo
f0da6b05fd
Remove TestAppContext::add_view
...
Instead, we now call this on window handles.
2023-08-07 22:46:48 -06:00
Nathan Sobo
d687c3d81f
Merge remote-tracking branch 'origin/main' into window-handles
2023-08-07 22:07:20 -06:00
Nathan Sobo
f2be3181a9
Move window-related methods from TestAppContext to AnyWindowHandle
2023-08-07 20:23:04 -06:00
Nathan Sobo
486f5bc6ca
Get compiling
2023-08-07 19:08:58 -06:00
Piotr Osiewicz
371c669e00
Address review feedback.
...
Rename selected_rows to background_highlight_row_ranges.
Do not return any ranges if there are more than 50k results
2023-08-08 02:47:49 +02:00
Piotr Osiewicz
b0fc6da55b
Use display maps
2023-08-08 02:37:27 +02:00
Piotr Osiewicz
241d3951b8
Remove redundant argument
2023-08-08 02:25:30 +02:00
Piotr Osiewicz
42e1221357
Add upper bound limit. Remove dbg! statements
2023-08-08 02:17:11 +02:00
Piotr Osiewicz
fa16895976
Do not query start of range if it's end is the same as the previous hunk's
2023-08-08 00:27:38 +02:00
Piotr Osiewicz
ca21626064
Baseline: Improve selection rendering for large quantities from 270ms to 90ms
2023-08-07 23:32:27 +02:00
Nathan Sobo
adc50469ff
WIP
2023-08-06 12:45:31 -06:00
Joseph T. Lyons
1abb6a0176
Expand empty selections to cover full word and fix bugs
2023-08-05 11:31:21 -04:00
Joseph T. Lyons
12e8f417e4
Add more convert to case commands
...
ConvertToTitleCase
ConvertToSnakeCase
ConvertToKebabCase
ConvertToUpperCamelCase
ConvertToLowerCamelCase
2023-08-04 22:45:26 -04:00
Joseph T. Lyons
8c98b02e45
Add convert to {upper,lower} case
commands
...
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-04 15:10:33 -04:00
Nathan Sobo
d3c1966d96
WIP: Return WindowHandle<V: View> from AppContext::add_window ( #2820 )
...
Instead of returning a usize for the window id, I'm instead returning a
`WindowHandle<V: View>` where `V` is the type of the window's root view.
@as-cii helped me with a cool technique using generic associated types
where methods on `WindowHandle` can return either T or Option<T>
depending on the `BorrowWindowContext::Result` associated type.
Some example usage...
```rs
let window = cx.add_window(|cx| MyView::new(cx));
let my_view = window.root(cx); // If cx is TestAppContext, returns MyView. Otherwise returns Option<MyView>, because the window could be closed.
```
This isn't insanely beneficial on its own, but I think it will help
clean up our testing story. I'm planning on making `window` more useful
in tests for laying out elements, etc.
- [x] Rework tests that call `add_window` 😅 to expect only a window in
return.
- [x] Get tests passing
- [x] 🚬 test
2023-08-03 18:45:51 -06:00
Nathan Sobo
485c0a482e
Don't refcount window handles
2023-08-03 17:11:47 -06:00
Nathan Sobo
afcc0d621b
WIP
2023-08-03 17:03:39 -06:00
Joseph T. Lyons
ee1b4a52cc
Add PathExt
trait ( #2823 )
...
This PR adds a `PathExt` trait. It pulls in our existing `compact()`
function, as a method, and then adds a method, and testing, for
`icon_suffix()`. A test was added to fix:
- https://github.com/zed-industries/community/issues/1877
Release Notes:
- Fixed a bug where file icons would not be registered for files with
with `.` characters in their name
([#1877 ](https://github.com/zed-industries/community/issues/1877 )).
2023-08-03 18:57:43 -04:00
Nathan Sobo
884cee6dfd
Get tests compiling returning WindowHandle<V: View> from add_window
2023-08-02 14:05:03 -06:00
Max Brunsfeld
a127b0d3e6
Fix warnings surfaced in Rust 1.71
2023-08-02 09:19:23 -07:00
Joseph T. Lyons
eb26fb2d45
Fix variable names
2023-08-01 11:52:53 -04:00
Mikayla Maki
88474a6048
Clip wrap guides from under the scrollbar
2023-07-31 10:54:29 -07:00
Mikayla Maki
d58f031696
disable wrap guides in the assitant panel
2023-07-28 22:27:36 -07:00
Mikayla Maki
d3b89e16f2
Make wrap guides respect scroll position
2023-07-28 14:56:13 -07:00
Conrad Irwin
5d8370e2a1
Don't highlight project search matches either ( #2807 )
...
@JosephTLyons this is probably worth merging alongside #2803
- vim: Fix a bug where focusing project search results unexpectedly
entered visual mode
2023-07-28 12:25:32 -06:00
Conrad Irwin
fac0e2dd56
Don't highlight project search matches either
2023-07-28 12:17:32 -06:00
Conrad Irwin
ade8d4d167
Fix jumping to definition in a new file ( #2803 )
...
This is broken because vim currently sets settings only on the active
editor. Fix this by correcting the range on the currently active editor.
It would be nice (at some point) to refactor how vim sets settings, but
that's for another day.
Release Notes:
- vim: Fix bug when jumping to definition in new file accidentally
entered visual mode.
2023-07-27 19:10:01 -06:00
Conrad Irwin
1935307b4f
Fix jumping to definition in a new file
...
This is broken because vim currently sets settings only on the active
editor. Fix this by correcting the range on the currently active editor.
It would be nice (at some point) to refactor how vim sets settings, but
that's for another day.
2023-07-27 18:10:17 -06:00
Mikayla Maki
354c020612
Block extra drag events in original drag handlers
2023-07-26 14:57:46 -07:00
Nathan Sobo
1b03c5d69c
Pass PaintContext to Element::paint
...
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
2023-07-25 17:32:31 -06:00
Joseph T. Lyons
4085df5146
Add tests for manipulate_lines()
2023-07-25 15:17:16 -04:00
Joseph T. Lyons
bf2ca57f55
Remove { and } from single-line closure
2023-07-25 14:48:11 -04:00
Joseph T. Lyons
93ec73da29
Fix code computing new selections
...
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-07-25 14:04:25 -04:00
Joseph T. Lyons
299818cde0
Fix rand import and tweak callbacks
...
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-07-25 11:44:13 -04:00
Joseph T. Lyons
1a84382881
WIP
2023-07-25 10:33:20 -04:00
Kirill Bulatov
c538504b9c
Do not scroll when selecting all
2023-07-22 00:17:02 +03:00
Mikayla Maki
05a8409363
bump the brightness of the active wrap guide
2023-07-20 16:45:41 -07:00
Mikayla Maki
a9bfe97361
Add wrap guides and associated settings
2023-07-20 16:39:13 -07:00