zed icon indicating copy to clipboard operation
zed copied to clipboard

Edit prediction tab accept not moving to last position when undoing

Open jpike88 opened this issue 7 months ago • 2 comments

Summary

@probably-neb I found what seems like an edge case in undo not moving selector, a continuation of https://github.com/zed-industries/zed/issues/22692.

It happens when I apply an edit (I'm using Zeta, maybe useful for you to know):

Image

After I hit tab, if I scroll elsewhere and hit undo, the scroll position stays the same, I have to scroll back to find where I reversed the edit.

Zed Version and System Specs

Zed: v0.183.12 (Zed) OS: macOS 15.4.1 Memory: 32 GiB Architecture: aarch64

jpike88 avatar Apr 30 '25 07:04 jpike88

Thanks for linking this to the last issue! Pretty sure this will be a quick fix.

Would you mind making sure that when you undo and it doesn't take you back that theres a log in the log file along the lines of "failed to determine previous selections"

probably-neb avatar Apr 30 '25 18:04 probably-neb

Actually, thinking about this again, by scrolling are you referring to moving the cursor away? Or just scrolling the view? And if you're just scrolling are you scrolling such that the accepted edit is no longer visible?

probably-neb avatar May 01 '25 15:05 probably-neb

I'm doing an autocomplete by pressing tab (using copilot), and then scrolling down else where after that, then pressing CMD+Z to undo. I know the undo happened because the line numbers shuffled up a little bit, but I am not focused back where I triggered the autocomplete to be applied

jpike88 avatar May 20 '25 07:05 jpike88

(this is still an issue on zed 0.186.10)

jpike88 avatar May 20 '25 07:05 jpike88