Project Diff 2 (#23891)
This adds a new version of the project diff editor to go alongside the new git panel. The basics seem to be working, but still todo: * [ ] Fix untracked files * [ ] Fix deleted files * [ ] Show commit message editor at top * [x] Handle empty state * [x] Fix panic where locator sometimes seeks to wrong excerpt Release Notes: - N/A
This commit is contained in:
parent
27a413a5e3
commit
45708d2680
21 changed files with 1023 additions and 125 deletions
|
@ -743,12 +743,12 @@ fn determine_query_ranges(
|
|||
excerpt_visible_range: Range<usize>,
|
||||
cx: &mut Context<'_, MultiBuffer>,
|
||||
) -> Option<QueryRanges> {
|
||||
let buffer = excerpt_buffer.read(cx);
|
||||
let full_excerpt_range = multi_buffer
|
||||
.excerpts_for_buffer(excerpt_buffer, cx)
|
||||
.excerpts_for_buffer(buffer.remote_id(), cx)
|
||||
.into_iter()
|
||||
.find(|(id, _)| id == &excerpt_id)
|
||||
.map(|(_, range)| range.context)?;
|
||||
let buffer = excerpt_buffer.read(cx);
|
||||
let snapshot = buffer.snapshot();
|
||||
let excerpt_visible_len = excerpt_visible_range.end - excerpt_visible_range.start;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue