Commit Graph
155 Commits
Author SHA1 Message Date
Keith Simmons d796b543e0 WIP add basic context menu and make progress toward adding quick actions to it 2022-07-13 14:13:19 -07:00
Mikayla Maki be94f614a7 fix merge conflicr 2022-07-07 17:24:55 -07:00
Mikayla Maki a8237858bc Added basic selections 2022-07-07 14:52:04 -07:00
Keith Simmons bcb553f233 Combine platform mouse events to use common MouseEvent struct and remove MouseDragged event in favor of MouseMoved 2022-07-06 16:37:56 -07:00
Keith Simmons 686e57373b pull event data out into individual Event structs 2022-07-06 15:36:42 -07:00
Mikayla Maki 03cbb94057 changed renderer 2022-07-05 17:10:01 -07:00
Mikayla Maki 6ac5cc0d2a Fixed cursor positioning bugs in multi-byte charcters. Still have at least one though :/ 2022-07-01 14:53:19 -07:00
Mikayla Maki 62939322d3 rendering cursor correctly 2022-07-01 13:03:26 -07:00
Mikayla Maki ae836e1465 Fixed a major bug and now use the same cursor paint logic as the editor 2022-06-30 20:43:51 -07:00
Keith Simmons a8ea1048cf Change mouse cursor when link is visible 2022-06-24 21:55:57 -07:00
Keith Simmons a190eb0537 fix rebase merge error 2022-06-24 15:11:57 -07:00
Keith Simmons 92ab107fc9 working jump to definition with tests 2022-06-24 15:09:31 -07:00
Keith Simmons 848445455d Working underline based on symbol origin 2022-06-24 15:05:35 -07:00
Max Brunsfeld fb2a7787a1 Clone fold and selection state correctly when splitting an editor 2022-06-23 13:15:50 -07:00
Keith Simmons 19feb627d8 Add comment linking to long term plan 2022-06-21 12:38:27 -07:00
Keith Simmons 057a7ec989 Don't trigger hover popover action when mouse is over context menu 2022-06-21 11:23:25 -07:00
Antonio Scandurra edd758eb67 Cap context menu's width to cover at most 70% of the window 2022-06-16 10:40:12 +02:00
Antonio Scandurra 516bd13474 Add tooltip to follow collaborators 2022-06-15 17:08:39 +02:00
Antonio Scandurra f91fb48a4c Simplify EditorElement::layout_blocks 2022-06-10 13:57:43 +02:00
Antonio Scandurra 666ea61dbc Introduce a new BlockStyle field for blocks
This new field allows blocks to specify how they want to be laid out:

- If `Fixed` they can take up all the width they want and they will impact
the scroll width of the editor. This is useful for diagnostic messages and
allows scrolling the editor further to the right to visualize the entire message.
- If `Flex` they can extend all the way to the scroll width without impacting it
any further. This is useful for the rename editor that we insert as a block
decoration when hitting `F2`.
- If `Sticky`, they will be as wide as the editor element and won't participate
in the horizontal scrolling of the editor. This is useful for headers in general,
where we want e.g. the filename and the jump button to always be visible
independently of how much the user has scrolled to the right.
2022-06-10 13:47:40 +02:00
Keith Simmons b51bd87c10 Rework hover delay, respect editor font size, and enable hover in multibuffers 2022-06-09 17:03:44 -07:00
Antonio Scandurra ea8b5016f7 Snap overlay's bottom/right edge to same window's edge on overflow 2022-06-09 13:48:02 +02:00
Antonio Scandurra 712d47d94f Render a "Jump to Buffer" icon on all excerpt headers 2022-06-08 15:31:29 +02:00
Antonio Scandurra eda569d6b2 Snapshot file instead of path when creating a buffer snapshot 2022-06-08 14:29:14 +02:00
Keith Simmons 1b66e1e185 Add integration test and fix hovering over the wire 2022-06-07 14:22:02 -07:00
Keith Simmons a6c0ee472c Add vim bindings for hover
Allow scrolling in hover popover
2022-06-07 13:07:53 -07:00
Keith Simmons 67d9abc00f Move highlighting to editor code and implement proto message types for hover response 2022-06-07 11:54:52 -07:00
Keith Simmons c7cc07aafb working markdown rendering 2022-06-07 11:54:51 -07:00
Isaac Clayton d529a1deb4 Add basic debounce, fix flickering 2022-06-07 11:54:31 -07:00
Keith Simmons 560dff7329 Pull hover popover out of context menu 2022-06-07 11:54:00 -07:00
Isaac Clayton 24ad60a651 Add hover action and style context menu 2022-06-07 11:50:49 -07:00
Keith Simmons 0ed8a42bb4 WIP 2022-06-07 11:49:28 -07:00
Keith Simmons 0c4f798a2d WIP jump to definition with mouse 2022-06-07 11:47:23 -07:00
Antonio Scandurra 238827642a Align tooltip based on the available window space 2022-06-01 10:03:46 +02:00
Antonio Scandurra aefdde66a6 Pass a &mut BlockContext when rendering blocks
This wraps and derefs to `RenderContext<Editor>`, so that we can
easily use `MouseEventHandler`s in blocks.
2022-05-31 15:50:34 +02:00
Antonio Scandurra 20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Antonio Scandurra 9099c40364 Merge branch 'mouse-events' into project-panel-context-menu 2022-05-27 12:07:00 +02:00
Nathan SoboandMax Brunsfeld 2ea085b178 Pass a RenderContext to UniformList
In some cases, we need to render during layout. Previously, we were rendering with a LayoutContext in some cases, but this commit adds the ability to retrieve a render context with a given handle and we use that feature in UniformList.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 18:03:34 -06:00
Keith Simmons 8e7c6871db Track selection changes in mutable selections collection 2022-05-26 17:02:05 -07:00
Keith Simmons 61f0daa5c5 Visual line mode handles soft wraps 2022-05-26 17:02:05 -07:00
Keith Simmons 082036161f Enable copy and paste in vim mode 2022-05-26 17:02:05 -07:00
Keith Simmons f8f316cc64 Working change and delete in line mode 2022-05-26 17:02:05 -07:00
Keith Simmons d7d17b2148 WIP line mode operations 2022-05-26 17:02:05 -07:00
Nathan SoboandAntonio Scandurra 0866f0ed55 Introduce CursorRegion struct
This will blend in with an upcoming MouseRegion struct that sits next to it in the scene.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-26 11:00:10 -06:00
Nathan Sobo 6b96822c1a Fix editor tests 2022-05-26 09:59:25 +02:00
Keith Simmons bacfed37b7 Clone selections on editor split 2022-05-19 11:22:53 -07:00
Keith Simmons 45ea3d4c38 Review fixes 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 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