Commit Graph
110 Commits
Author SHA1 Message Date
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
K Simmons 78244cf28a Address picker issues 2022-08-09 17:15:54 -07:00
K Simmons 9fcea3e805 Pane focus working. Modals seem broken now 2022-08-09 17:15:54 -07:00
K Simmons b76bd98ed8 WIP compiling but failing with circular reference 2022-08-09 17:15:52 -07:00
K Simmons 20770e7240 Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly 2022-08-09 17:09:16 -07:00
ForLoveOfCats 7a4db7e505 Automatically trigger project search to occur when deploying 2022-08-08 13:17:19 -04:00
Mikayla Maki eb4be2e11d Removed icons 2022-08-04 08:42:42 -07:00
Max BrunsfeldandMikayla Maki 669d716519 Introduce AutoindentMode parameter to Buffer::edit
This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-07-28 14:03:31 -07:00
K Simmons b31b867200 Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items 2022-07-20 18:52:32 -07:00
Nate Butler 958a9bd730 Merge branch 'main' into theme-improvements 2022-07-19 20:12:02 -04:00
Nate Butler 5a3eba5a0a Add icon sets for sizes 8, 12 and 16, remove old icons 2022-07-19 17:11:15 -04:00
K Simmons d264ba8e16 Rework presenter and MouseRegion to use Handler hashmap rather than individual fields 2022-07-17 23:19:32 -07:00
Antonio Scandurra 956d4d94e5 Truncate description in tab title when it is too long 2022-07-14 15:12:16 +02:00
Antonio Scandurra 9de9d517fd Differentiate among tabs with the same name
This commit introduces a new, optional `Item::tab_description` method
that lets implementers define a description for the tab with a certain
`detail`. When two or more tabs match the same description, we will
increase the `detail` until tabs don't match anymore or increasing the
`detail` doesn't disambiguate tabs any further.

As soon as we find a valid `detail` that disambiguates tabs enough, we
will pass it to `Item::tab_content`. In `Editor`, this is implemented by
showing more and more of the path's suffix as `detail` is increased.
2022-07-14 11:54:11 +02:00
Max BrunsfeldandAntonio Scandurra 88bd8a3dde Start moving default settings into a JSON file
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-07-12 11:00:02 -07:00
Antonio Scandurra f879f75a45 Move autosave logic up into Workspace and Pane 2022-07-06 16:33:22 +02:00
Antonio Scandurra dba2c284f6 Report whether a view was focused or blurred when observing focus 2022-07-06 15:53:40 +02:00
Keith Simmons 49d1b87d94 Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys 2022-06-30 12:36:02 -07:00
Antonio Scandurra cd78dcd42e Display tooltip for select prev/next match buttons 2022-06-16 14:37:33 +02:00
Antonio Scandurra 0b55674f7e Allow toggling search options via the command palette 2022-06-16 14:28:37 +02:00
Antonio Scandurra ec51b772e7 Toggle project search options via the keyboard 2022-06-16 14:18:45 +02:00
Antonio Scandurra 8041e01356 Don't select next match when toggling buffer search option 2022-06-16 14:06:47 +02:00
Antonio Scandurra e5940a1621 Toggle buffer search options via the keyboard 2022-06-16 13:44:00 +02:00
Antonio Scandurra cbbdef5434 Extract an ExcerptRange containing a context field in multi_buffer
This lays the groundwork for adding an optional `primary` field that can
be supplied to provide the "jump to" feature.
2022-06-08 12:13:04 +02:00
Antonio Scandurra 5302791ae9 Prepopulate project search query when deploying it from an editor 2022-06-07 10:02:04 +02:00
Antonio Scandurra 77224e023a Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra 355f8469f2 Introduce keyboard navigation in context menus 2022-05-26 16:36:30 +02:00
Nathan Sobo 287aff941e 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
Max BrunsfeldandNathan Sobo 65c8bea372 Distinguish between singleton and non-singleton workspace items
* Prompt to save singleton items before non-singleton ones
* Don't prompt to save multi-buffers if they contain excerpts to items that are open elsewhere and not being closed.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-23 16:03:00 -07:00
Max Brunsfeld 259d76aa40 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld e6011794ca Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Keith Simmons b03abdb6df 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 c95f74648a Rename selected_ranges and selected_display_ranges to remove redundant selected 2022-05-13 15:55:27 -07:00
Keith Simmons 2a984285a2 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons 851e04d46b Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons 9b46bb0ee6 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 58367fccfb WIP 2022-05-05 15:15:58 +02:00
Max Brunsfeld a95bc19817 Abstract more local project setup inside Project::test helper 2022-05-04 10:28:09 -07:00
Keith Simmons 94b6f4beb5 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 47d4f42467 Consolidate edit and edit_batched functions 2022-04-28 16:52:04 -07:00
Max Brunsfeld 30aa7064f0 🎨 Use Interactive wrapper for search option buttons 2022-04-28 15:29:03 -07:00
Keith Simmons 5051769dd3 Building, but failing test WIP 2022-04-27 17:25:38 -07:00
Max Brunsfeld f6cdcbefdc Reuse Confirm action in chat panel, go-to-line, and project search 2022-04-21 15:24:05 -07:00
Nathan Sobo beb2ec9065 Merge pull request #822 from zed-industries/focus-project-search-query
Fix focus bugs in `ProjectSearchView`
2022-04-14 12:25:59 -06:00
Max Brunsfeld d0089e79ef 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
Antonio Scandurra a70882b79c Persist project search focus state
...so that we can re-focus the previously-active editor when switching back
to the project search tab.
2022-04-14 18:36:42 +02:00
Nathan Sobo e221fb61ac Only process a single focus effect per batch
This allows us to focus the query editor of the project search when deploying it. Previously, a complex interplay between focus events was preventing this from working in an intuitive way. What happened previously:

- We'd activate the project search, which enqueued a focus effect for the project search view
- We'd focus the query editor, which enqueued an effect
- We'd process the focus effect for the search view, which would enqueue an effect to transfer focus to the results editor
- We'd process the effect to focus the query editor
- We'd process the effect to focus the results editor

Now...

- We activate the project search pane item, enqueuing a focus effect for the project search itself
- We focus the query editor and *remove* the previous pending focus change effect
- We process the focus effect
2022-04-14 08:52:24 -06:00
Nathan Sobo 10ee52fa86 Revert "Focus Project Search query editor always when deployed" 2022-04-14 07:53:15 -06:00
Keith Simmons 23737d988d Store accessors for editor highlight colors not colors themselves 2022-04-13 15:30:57 -07:00
Keith Simmons 104841d7f4 Notify when buffer search matches change 2022-04-13 14:49:18 -07:00