Commit Graph
39175 Commits
Author SHA1 Message Date
Antonio Scandurra 2a1e5657c7 Prompt for paths asynchronously to avoid double borrow 2021-04-14 16:30:03 +02:00
Antonio Scandurra 665f6d310d Merge pull request #19 from zed-industries/single-global-action-dispatch
Dispatch global actions only once when triggering a menu item
2021-04-14 15:50:07 +02:00
Antonio Scandurra 0616cbf172 Merge pull request #18 from zed-industries/copy-paste
Introduce cut/copy/paste support
2021-04-14 15:49:30 +02:00
Antonio Scandurra 95e13efd1e Dispatch global actions only once when triggering a menu item
Previously we would dispatch the same global action more than once
because we would invoke `dispatch_action_any` _and_
`dispatch_global_action_any`. However, the former already takes care of
going through the global action handlers when no entity in the dispatch
path handled the action.
2021-04-14 14:47:18 +02:00
Antonio Scandurra 12b2cb0e6e Merge branch 'master' into copy-paste 2021-04-14 12:05:52 +02:00
Antonio Scandurra c1c1711a35 📝 2021-04-14 11:59:39 +02:00
Antonio Scandurra 1e6e43917f Add test for copying/cutting/pasting full lines 2021-04-14 11:56:17 +02:00
Antonio Scandurra 9e461be78d Handle paste correctly when there is only one full-line in the clipboard 2021-04-14 11:15:55 +02:00
Nathan SoboandBrooks Swinnerton e72927a355 Spawn worktree scanning on the scoped pool
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
2021-04-13 20:09:45 -06:00
Nathan SoboandBrooks Swinnerton 0e8b179c23 Invert condition when opening entries
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
2021-04-13 20:09:45 -06:00
Nathan SoboandMax Brunsfeld 6672469910 Throttle worktree state updates on the main thread
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-13 20:09:45 -06:00
Nathan Sobo c34b263f17 WIP 2021-04-13 20:09:45 -06:00
Nathan Sobo 8ea756a23e Add a failing test for detecting a file move 2021-04-13 20:09:45 -06:00
Nathan Sobo d93aa22e31 Require a context when constructing a worktree 2021-04-13 20:09:45 -06:00
Nathan Sobo 4743c7e59e Identify Worktree entries by their inode
This will allow us to re-parent elements when re-scanning when the file system changes.
2021-04-13 20:09:41 -06:00
Nathan Sobo 0fc5fc71eb Store root entry id 2021-04-13 20:07:42 -06:00
Nathan Sobo cbff1d0bea Switch worktree entries to HashMap 2021-04-13 20:07:42 -06:00
Nathan Sobo 2d4066b4eb Inline clone 2021-04-13 20:07:42 -06:00
Nathan SoboandBrooks Swinnerton f3eec91ebe Replace easy-parallel with scoped-pool for path searches
The easy-parallel crate spawned new threads on each call, which was resulting in way too many threads.

Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
2021-04-13 20:07:42 -06:00
Nathan SoboandBrooks Swinnerton 9562da3e55 Replace app/app_mut on contexts with AsRef/AsMut impls
Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
2021-04-13 20:07:25 -06:00
Max Brunsfeld fa979864ec Handle 'full-line' clipboard items when pasting 2021-04-13 17:58:13 -07:00
Max Brunsfeld 21cea414d1 Implement multi-selection copy/cut/paste 2021-04-13 17:28:51 -07:00
Antonio ScandurraandMax Brunsfeld 5d6d5018ca 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 3183d379fc Start on copy-paste 2021-04-13 14:58:10 +02:00
Nathan Sobo 69a9e93625 Rename application binary to improve appearance of app menu 2021-04-12 19:52:30 -06:00
Max Brunsfeld 4e34265f46 Merge pull request #14 from zed-industries/menu-commands
Make the application menu dispatch commands on the focused view
2021-04-12 16:40:48 -07:00
Max BrunsfeldandNathan Sobo 342740ffd1 Dispatch menu commands on the focused view
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-12 15:42:33 -07:00
Max BrunsfeldandNathan Sobo 0ca928ad22 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 BrunsfeldandNathan Sobo 007e2e9303 Move set_menus method to MutableAppContext
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-12 14:38:18 -07:00
Max BrunsfeldandNathan Sobo 24299b9257 Set up menu handler in App::new
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-12 14:25:00 -07:00
Max BrunsfeldandNathan Sobo 68193cd1a5 Move open command handler to workspace global action
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-12 14:18:24 -07:00
Max BrunsfeldandNathan Sobo af3499750c 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
Max Brunsfeld 9f81c082ff Merge pull request #13 from zed-industries/undo-stack
Undo/redo support
2021-04-12 11:51:19 -07:00
Max Brunsfeld c3d3890175 Remove unused variables 2021-04-12 11:45:41 -07:00
Max Brunsfeld 03c8617f2c Add test coverage for edit event grouping in transactions 2021-04-12 11:45:41 -07:00
Max Brunsfeld e2dff5e9a9 Merge branch 'master' into undo-stack 2021-04-12 10:49:46 -07:00
Antonio Scandurra 231897d23a 📝 2021-04-12 19:05:56 +02:00
Nathan Sobo f00a4f9ab8 Merge pull request #12 from zed-industries/platform-trait
Hide platform code entirely behind App for framework users
2021-04-12 10:48:51 -06:00
Nathan Sobo 36eb396474 Merge pull request #10 from zed-industries/menus
Populate the menu bar
2021-04-12 10:48:33 -06:00
Antonio Scandurra 4b8362e089 Generate operation when updating selection set after undo/redo 2021-04-12 17:47:19 +02:00
Antonio Scandurra 4b7b8b0b8c Remove unnecessary edit_at method 2021-04-12 17:36:56 +02:00
Antonio Scandurra 30f9a0c859 Add unit test for history manipulation (undo, redo, grouping) 2021-04-12 16:01:41 +02:00
Antonio Scandurra 1f73854917 Simplify buffer history management 2021-04-12 16:01:41 +02:00
Antonio Scandurra eda111c441 Introduce transactional edits and allow snapshotting of selections 2021-04-12 16:01:41 +02:00
Antonio Scandurra f9df68ec30 💄 2021-04-12 16:01:41 +02:00
Antonio Scandurra 10131dc834 WIP: Start on pushing selection management down into Buffer 2021-04-12 16:01:41 +02:00
Antonio Scandurra 23ab460980 Merge UndoHistory and History, storing also operations in the latter 2021-04-12 16:01:41 +02:00
Antonio ScandurraandNathan Sobo ab009e43de Don't clear redo stack when editing
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-12 16:01:41 +02:00
Antonio Scandurra 026164ef96 Add initial support for undo/redo stack
We're still not capturing selections/anchors, that's right up next.
2021-04-12 16:01:41 +02:00
Nathan Sobo e59e364a88 Make gpui::platform module private 2021-04-10 00:22:45 -06:00