Strip carriage returns from all text in text::Buffer
* Moving the logic from Rope to text::Buffer makes it easier to keep the Rope in sync with the fragment tree. * Removing carriage return characters is lossier, but is much simpler than incrementally maintaining the invariant that there are no carriage returns followed by newlines. We may want to do something smarter in the future. Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
116fa92e84
commit
7e9beaf4bb
9 changed files with 132 additions and 100 deletions
|
@ -421,7 +421,7 @@ async fn test_outline(cx: &mut gpui::TestAppContext) {
|
|||
async fn search<'a>(
|
||||
outline: &'a Outline<Anchor>,
|
||||
query: &str,
|
||||
cx: &gpui::TestAppContext,
|
||||
cx: &'a gpui::TestAppContext,
|
||||
) -> Vec<(&'a str, Vec<usize>)> {
|
||||
let matches = cx
|
||||
.read(|cx| outline.search(query, cx.background().clone()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue