Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix/improve manual edit #211

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Conversation

vidartf
Copy link
Collaborator

@vidartf vidartf commented Dec 16, 2016

This PR should add proper support for manual editing in the merge pane of the merge view.

This isn't completely ready for merge yet, but it is good enough to share, and to recruit help in breaking it in interesting ways. Indicators for breaking: edited text becomes incorrect; an error notification pops up complaining about model/editor out of sync. Alignment issues are not critical for the end saved result, but might indicate that the decisions/diffs are a little wonky (and might therefore be easy to break with subsequent edits).

Currently this is only supported for a four-way merge view, so I also added a "force four way view" button to the header of all cells that are not four-way. In the future this might be solved more elegantly, but this gets the job done.

Fixes #195.

@vidartf
Copy link
Collaborator Author

vidartf commented Dec 16, 2016

Note: This is intended for merge after the next release, as it likely needs more polishing than we are able to perform in time.

vidartf added 20 commits May 7, 2018 11:51
Don't try to replace text if already synced (will lead to invalid
value).
Don't apply mixed chunk borders on top of custom chunks
The value of `cm.getValue()` was previously not well-defined if multiple
changes had occurred within the same operation (e.g. a newline followed
by an automatic indent). By reconstructing ourself, we should be OK as
long as model stays in sync!
Assumed not to be critical. If reverting, some of the manual edit
alignment might be off, as line chunking becomes unreliable.
Always choose the simplest diff.
If you undo a manual edit by using the pickers, the decision should be
deleted unless there is a local/remote diff. If all decisions of a chunk
are removed, the picker should be removed as well.
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.

1 participant