Commit graph

23 commits

Author SHA1 Message Date
Antonio Scandurra
f90193beea Populate query and select it only if find bar isn't already deployed 2022-01-30 16:44:42 +01:00
Antonio Scandurra
83423a4344 Use cmd-f to move focus back to the editor when find bar is focused 2022-01-30 16:30:07 +01:00
Antonio Scandurra
9ce1eda305 Bind cmd-e to deploy FindBar without focusing it 2022-01-30 16:11:48 +01:00
Antonio Scandurra
c53b6b907a Populate query with text under selection when hitting cmd-f 2022-01-30 16:01:05 +01:00
Antonio Scandurra
2a1b1adfab Bind enter and shift-enter in FindBar 2022-01-30 15:20:57 +01:00
Antonio Scandurra
e8105c9a99 Show a message when no matches were found 2022-01-29 18:23:14 +01:00
Antonio Scandurra
c16bd98f56 Fix panic when no matches were found 2022-01-29 18:21:19 +01:00
Antonio Scandurra
969d81b632 Determine active match index correctly when cursor is after last match 2022-01-29 16:44:26 +01:00
Antonio Scandurra
df4cc45790 Select next/prev find match based on whether we intersect active match
Also, capture the next/prev selection logic in a unit test.
2022-01-29 16:16:48 +01:00
Antonio Scandurra
1d55872e7a Display active match and allow going to next or previous match
We still need to write a unit test for this, as well as add a keybinding.
2022-01-29 14:38:58 +01:00
Max Brunsfeld
5c7cea5a3e WIP - Navigate to prev/next search result 2022-01-28 14:00:00 -08:00
Max Brunsfeld
7e02d669e1 Add a simple unit test for find bar 2022-01-28 13:05:29 -08:00
Antonio Scandurra
d2a64f2171 Optimize search when regex doesn't contain newlines
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-28 17:26:08 +01:00
Antonio Scandurra
5b9d791269 Implement regex search with multiline support
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-28 16:15:18 +01:00
Antonio Scandurra
5c862bfe98 Maintain search results as query and active editor changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-28 15:19:58 +01:00
Antonio Scandurra
860e37d50f Move finding results in the background 2022-01-28 12:15:55 +01:00
Antonio Scandurra
b980b11053 Implement whole word mode 2022-01-28 11:48:04 +01:00
Nathan Sobo
df1810a3b0 A bit more progress styling find
Fix the pinwheel when hovering mode buttons.
2022-01-27 18:59:44 -07:00
Max Brunsfeld
da35df0cca WIP 2022-01-27 16:16:51 -08:00
Max Brunsfeld
3abd7bc8dd Highlight find matches
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 15:19:52 -08:00
Max Brunsfeld
d8e4464a89 WIP - Run substring search when typing in find bar
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 13:00:51 -08:00
Max Brunsfeld
05e20ca72b Inform toolbars when active item changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 13:00:23 -08:00
Antonio Scandurra
bebde782fa Deploy FindBar when hitting cmd-f
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-27 17:56:50 +01:00