Commit Graph
2474 Commits
Author SHA1 Message Date
Antonio Scandurra 6702f048eb Rename Navigation to NavHistory 2022-01-19 15:27:34 +01:00
Antonio Scandurra 948817fb79 Merge pull request #349 from zed-industries/navigation-history
Add a navigation history
2022-01-19 09:02:23 +01:00
Max Brunsfeld bfe0cefa38 Avoid changing selection in buffer navigation dialogs
If an editor has highlighted_rows, autoscroll it to reveal those rows instead of
its cursor positions.
2022-01-18 17:29:33 -08:00
Max Brunsfeld 3bb1cdc35c Limit the storage used by the navigation history 2022-01-18 16:31:48 -08:00
Max Brunsfeld ef52932a63 Add a unit test for navigation behavior at the editor level 2022-01-18 16:25:22 -08:00
Max Brunsfeld babaabb941 Push to navigation history based on jump distance instead of time 2022-01-18 15:02:49 -08:00
Antonio Scandurra d7d30d3303 Experiment with a more general way of pushing editor navigation entries 2022-01-18 18:03:10 +01:00
Antonio Scandurra 1dd722265b Ensure focus is transferred when opening the first item in pane 2022-01-18 10:15:37 +01:00
Antonio Scandurra 7031fcdeb4 Fix double borrow error when closing an item 2022-01-18 10:13:50 +01:00
Antonio Scandurra db88a7c2c8 🔥 2022-01-18 10:10:16 +01:00
Antonio Scandurra ec7a343f4f Introduce a test to verify navigation 2022-01-18 10:03:56 +01:00
Antonio Scandurra f9ebc363a2 Use offset to restore navigation position if anchor can't be resolved 2022-01-18 09:59:28 +01:00
Antonio Scandurra 1a4c868701 Skip past entries in the navigation history that can't be re-opened 2022-01-18 09:58:40 +01:00
Max Brunsfeld 25b150c560 Navigate to previous positions in editors when using navigation history 2022-01-17 16:01:52 -08:00
Max Brunsfeld 74b79486f2 WIP - Reopen closed items when going back in nav history 2022-01-17 10:46:47 -08:00
Antonio ScandurraandMax Brunsfeld 3f2ea66672 Populate backward/forward stacks upon item deactivation
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-17 18:57:31 +01:00
Antonio Scandurra d1f435bcdc Start laying the foundation for a per-pane navigation system 2022-01-17 16:59:06 +01:00
Antonio Scandurra 70b951a950 Delete unused pane::State struct 2022-01-17 15:27:54 +01:00
Antonio Scandurra 514cbb1c27 Remove accidentally committed test.md file 2022-01-17 11:12:54 +01:00
Antonio Scandurra 1755d881d7 Merge pull request #347 from zed-industries/fix-sharing-after-unsharing
Cleanup worktrees' shared state when unsharing
2022-01-17 11:11:23 +01:00
Antonio Scandurra 732e413832 Cleanup worktrees' shared state when unsharing 2022-01-17 10:58:49 +01:00
Antonio Scandurra c0ff5fbf60 Merge pull request #346 from zed-industries/missing-notify
Always re-render outline view when changing the active selection
2022-01-17 10:30:11 +01:00
Antonio Scandurra b9d8def8cc Always re-render outline view when changing the active selection 2022-01-17 10:17:11 +01:00
Max Brunsfeld 1653362962 v0.12 2022-01-14 12:03:29 -08:00
Max Brunsfeld 95e82b6e1b Merge pull request #342 from zed-industries/symbolic-nav
Introduce outline view
2022-01-14 12:02:43 -08:00
Max Brunsfeld 974374e29a Apply scroll_max after uniform list autoscrolls 2022-01-14 11:56:28 -08:00
Max Brunsfeld c48ad4015b Add bottom margin to the outline view 2022-01-14 11:01:20 -08:00
Max Brunsfeld 570acbe732 Avoid panic in OutlineView when active item isn't an editor 2022-01-14 10:51:26 -08:00
e1bf476b29 Add select_first and select_last bindings to outline view
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 10:45:37 -08:00
499671b2c3 Match on names only when outline query has no spaces
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 09:16:29 -08:00
6372b5908e Center the selected item when updating outline query
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 17:53:06 +01:00
Antonio ScandurraandNathan Sobo 5aab69847b Dismiss outline view when the query editor is blurred
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 17:25:24 +01:00
Nathan SoboandAntonio Scandurra 7a7d72c94a Only enable smart case if the query contains an uppercase character
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-14 09:16:09 -07:00
Nathan SoboandAntonio Scandurra 2d8691bedd Match full path when query contains spaces
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-14 09:02:04 -07:00
Antonio ScandurraandNathan Sobo b7dccb6e5b Associate StringMatchCandidate with an id
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 14:55:03 +01:00
Antonio ScandurraandNathan Sobo 872625e22d Highlight matches by increasing the font weight
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 14:39:15 +01:00
Antonio Scandurra 4956298db4 Allow matching of context items in outline view 2022-01-14 11:09:02 +01:00
Antonio Scandurra c6d5033861 💄 2022-01-14 10:20:04 +01:00
Antonio Scandurra c15d590dd3 Don't emit duplicate text when mixing syntax highlighting and match indices 2022-01-14 10:08:08 +01:00
Antonio Scandurra b11b1cb53f Make mod a @context 2022-01-14 09:22:20 +01:00
Antonio Scandurra e64d9c43ff Report all matching strings in fuzzy matcher even if they're duplicates 2022-01-14 09:16:39 +01:00
Antonio Scandurra 20f4b6d8a8 Maintain order of outline items when filling out tree's missing parts 2022-01-14 09:12:30 +01:00
Max Brunsfeld 3dd4c39edd Incorporate syntax highlighting into symbol outline view
Still need to figure out how to style the fuzzy match characters
now that there's syntax highlighting. Right now, they are
underlined in red.
2022-01-13 18:10:02 -08:00
Max Brunsfeld 09cc3bd94d Include highlighting runs in Outline 2022-01-13 14:46:15 -08:00
Max Brunsfeld a1a9c9356d Allow multiple disjoint nodes to be captured as matcheable in the outline query 2022-01-13 14:04:25 -08:00
Max Brunsfeld d3b1b0af26 Add more items to rust outline query 2022-01-13 12:01:36 -08:00
Max BrunsfeldandAntonio Scandurra b792fa22db Implement navigation via outline modal
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-13 11:48:44 -08:00
Max BrunsfeldandAntonio Scandurra 18907b85d2 Change Editor::set_highlighted_row to take a row range
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-13 09:49:46 -08:00
Antonio ScandurraandMax Brunsfeld 2d08f4fba7 Select the closest outline item when the outline view's query is empty
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-13 18:43:49 +01:00
Antonio ScandurraandMax Brunsfeld fad016d316 Return Outline<Anchor> from MultiBuffer::outline
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-13 18:24:00 +01:00