Commit Graph
48 Commits
Author SHA1 Message Date
Nathan Sobo b110fd5fb7 Render a context menu when right-clicking in project panel
It doesn't currently do anything, but I managed to get it rendering in an absolutely positioned way.
2022-05-26 09:59:25 +02:00
Keith Simmons a2fd41174f Reduce accessibility of multibuffer read to reduce risk of borrowing snapshot and buffer refcells twice 2022-05-13 16:58:30 -07:00
Keith Simmons c3a36e6d8a Rename selected_ranges and selected_display_ranges to remove redundant selected 2022-05-13 15:55:27 -07:00
Keith Simmons de9dc27980 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons db0a9114c2 Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons c9dcfff607 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Antonio Scandurra 61346f734d WIP 2022-05-05 15:15:58 +02:00
Keith Simmons d4bef67cf2 Merge pull request #929 from zed-industries/non-uniform-batched-edits
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons b4b61b4bbc Consolidate edit and edit_batched functions 2022-04-28 16:52:04 -07:00
Max Brunsfeld d9497d49de 🎨 Use Interactive wrapper for search option buttons 2022-04-28 15:29:03 -07:00
Keith Simmons 04fc1d5982 Building, but failing test WIP 2022-04-27 17:25:38 -07:00
Max Brunsfeld 3cdda79fc3 Merge pull request #817 from zed-industries/dynamic-editor-highlights
Store accessors for editor highlight colors not colors themselves
2022-04-14 10:36:38 -07:00
Keith Simmons 292d075f81 Store accessors for editor highlight colors not colors themselves 2022-04-13 15:30:57 -07:00
Keith Simmons 8cde15cb72 Notify when buffer search matches change 2022-04-13 14:49:18 -07:00
Max Brunsfeld b3c64e47f1 Merge branch 'main' into cancel-buffer-search 2022-04-11 17:38:26 -07:00
Keith Simmons 4b295f566a Handle editor cancel in pane in order to dismiss find toolbar 2022-04-11 15:11:23 -07:00
Max Brunsfeld 1e2eeaa22a Load project and buffer search key bindings from JSON file 2022-04-10 11:30:08 -07:00
Max Brunsfeld fd4b81c8fc Allow actions to be deserialized from JSON
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
5242a3a6dc Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Keith Simmons 1812480cbb Tab size is pulled properly from settings instead of hardcoded 2022-04-06 10:23:37 -07:00
Max BrunsfeldandKeith Simmons 866ffdd4ae Move Settings to its own crate
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:23:33 -07:00
Antonio Scandurra 7f9ff47089 Hide breadcrumbs when project search has no results 2022-04-01 10:00:21 +02:00
903810f22e Style search in buffer below breadcrumbs
We still have issues with project search styling.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 11:44:16 -06:00
8bfac63e0d Render the search UI on a separate row from the breadcrumbs
- In project search, render it above the breadcrumbs
- In buffer search, render it below

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 10:36:39 -06:00
Antonio ScandurraandNathan Sobo 0453dd1101 Allow flex items to float to the end of the flex axis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-30 16:46:14 +02:00
Antonio Scandurra 621e67bca7 Revert deletion of FindEditor in theme 2022-03-30 13:35:17 +02:00
Antonio Scandurra 94097a56a1 Fix buffer search unit tests 2022-03-30 13:18:31 +02:00
Antonio Scandurra a11665ecc7 Render project search query editor in toolbar 2022-03-29 17:04:39 +02:00
Antonio Scandurra a6bdb6dc5d Embed match index inside of search query editor 2022-03-29 15:53:36 +02:00
Antonio Scandurra d7a39a2116 Honor SearchBar being dismissed when changing the active item 2022-03-29 15:08:33 +02:00
Antonio Scandurra 9df2dacd85 Restructure Pane to have a single Toolbar with multiple items 2022-03-29 11:48:21 +02:00
Nathan Sobo 2c232d585a Merge branch 'main' into unfold-on-select-match 2022-03-24 14:13:27 -06:00
Antonio Scandurra 7fa7b7e507 Unfold range when selecting the next match
Selected matches are unfolded when in project search, buffer search and
when hitting `cmd-d` to select the next match.
2022-03-24 17:16:21 +01:00
Antonio Scandurra a739c362d9 Rename editor::Event::Edited to editor::Event::BufferEdited
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Antonio Scandurra 3117554568 Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +01:00
Antonio ScandurraandNathan Sobo 6f9c37851c Add Editor::for_multibuffer and repurpose Editor::for_buffer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:39:02 +01:00
Antonio ScandurraandNathan Sobo 44d997c00c Rename app_state to global in gpui
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:33:01 +01:00
Antonio Scandurra 0efce8f70a Rename ItemView to Item 2022-03-17 11:32:46 +01:00
Max Brunsfeld b33a049958 Merge branch 'main' into settings-file 2022-03-13 10:43:23 -07:00
Max Brunsfeld 48848de82c Store settings as a global via a gpui app_state 2022-03-11 15:58:58 -08:00
Nathan Sobo ac1eb19f83 Start on text highlight support 2022-03-09 20:51:35 -07:00
317a1bb07b Remove language servers from buffers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-08 15:16:07 -08:00
Antonio Scandurra 466db69780 Pass a reference to TestAppContext in tests
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Antonio Scandurra ed89475cf6 Extract a common match_index_for_direction and active_match_index 2022-02-28 10:34:11 +01:00
Nathan Sobo 64d22925c2 Implement navigation between project search matches 2022-02-27 14:18:04 -07:00
Nathan Sobo 7ef98fb935 Make versions oldest_selection and newest_selection that don't require snapshots
I thought I needed this but actually didn't, but I still kinda think it's a good change for the public interface of Editor.
2022-02-27 13:02:09 -07:00
Nathan Sobo c7338ebe88 💄 2022-02-27 09:25:27 -07:00
Nathan Sobo ec317159d7 Rename "find" to "search"
Search is both a verb and a noun, which makes it more natural to use in situations where we need to name a thing rather than a process.
2022-02-27 08:15:38 -07:00