Skip to content

Preserve view regions across undo#131

Open
Shlummie wants to merge 1 commit into
limetext:masterfrom
Shlummie:preserve-regions-undo-101
Open

Preserve view regions across undo#131
Shlummie wants to merge 1 commit into
limetext:masterfrom
Shlummie:preserve-regions-undo-101

Conversation

@Shlummie
Copy link
Copy Markdown

Summary

  • snapshot a view's marked regions when an undoable edit begins and after it is applied
  • restore saved regions on undo and applied regions on redo, including glued undo entries
  • add a regression test covering regions restored after deleting the buffer and undoing

Test plan

  • gofmt -w edit.go undo.go view.go view_test.go
  • go test ./... (downloads dependencies, then fails in this Windows environment on existing native/test setup issues: missing oniguruma for rubex, malformed legacy watcher test names under Go 1.26, and existing package watcher expectations)
  • CGO_ENABLED=0 go test . -run TestUndoRestoresRegions -count=1 (fails because github.com/limetext/sublime/textmate requires rubex CGO symbols)

Fixes #101

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.

The undo stack needs to store regions [$15]

1 participant