Skip to content

Batch undo - #82

Merged
as-cii merged 5 commits into
mainfrom
faster-undo
Jun 9, 2021
Merged

Batch undo#82
as-cii merged 5 commits into
mainfrom
faster-undo

Conversation

@as-cii

@as-cii as-cii commented Jun 8, 2021

Copy link
Copy Markdown
Member

This pull request changes UndoOperation to specify multiple edit IDs and, alongside that, it also provides a list of ranges and a version useful to locate the exact position of such edits in the local tree. This speeds up undoing/redoing with multiple cursors significantly because we only traverse and mutate the tree once.

@as-cii
as-cii merged commit de803a6 into main Jun 9, 2021
@as-cii
as-cii deleted the faster-undo branch June 9, 2021 10:08
Comment thread zed/src/editor/buffer.rs
T: Rng,
{
let (old_ranges, new_text, operation) = self.randomly_edit(rng, 5, cx.as_deref_mut());
let (old_ranges, new_text, operation) = self.randomly_edit(rng, 2, cx.as_deref_mut());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it intentional leaving this at 2?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, nice catch! Restored this back to 5 on main (tests still pass with 1k iterations and 20 operations each). I remember switching this back but I guess I didn't save or who knows what. 😅 Thanks for noticing this!

Anthony-Eid pushed a commit to Anthony-Eid/zed that referenced this pull request Jan 3, 2025
…ed-industries#82)

* Keep scroll position when opening nested variables

* Remove debug statement

* Fix clippy

* Update determine scroll position to cover more cases
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Bombfuse pushed a commit to gemdropgames/zed that referenced this pull request Aug 10, 2026
Carried items: fix .map interceptor registration-order claim, add a
clippy.toml disallowed-methods pin on WizardState::targets (use
dest_targets() instead), compose_map_rgba unit test landed upstream
via ggo PR zed-industries#82.

Nine-crate sweep green (390 tests), clippy -D warnings clean, fmt
clean, licenses clean, cargo check -p zed clean. MIGRATION.md counts
re-tallied for the map editor and PNG import wizard rows. Merge drill
zed-industries#7: 6 upstream commits, 0 conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants