[merge addon] Add highlightDifferences option and method#1765
[merge addon] Add highlightDifferences option and method#1765ciaranj wants to merge 1 commit intocodemirror:masterfrom
Conversation
Provides new option (highlightDifferences) and method highlightDifferences(bool) to the MergeView plugin. If true (or undefined) the original behaviour is maintained, which is to show the differences (line highlighting and gutter graphics), if false then the changes will not be shown. Calling the method causes the visual change to occur 'immediately' Signed-off-by: ciaranj <ciaranj@gmail.com>
|
Merged, followed up by attached patch, which cleans it up a bit and renames the option to |
|
Thank you, looks good to me ;) |
|
Hmm, the merge appears to be behaving oddly now, what is the correct way to programaticaly set values in the two merge panes? I'm using: With my previous patch things were working as I expected them to (I believe), now (without ever touching the new showDifferences option, the differences are sometimes out of date, or not shown at all. (If I type in the edit window explicitly the differences are corrected immediately) |
|
Yeah, I guess things didn't work correctly (for my perhaps obtuse use-case of wanting to programmatically update what the current edit pane is comparing against). Please see the pull request in #1771 :) |
Note, I'm not expecting this changeset as it currently stands to be the best approach, for example I suspect line 60 is very odd, but it 'works' (I suspect at quite a great performance cost) and I was going to apply the same 'options' based approach used in the core CodeMirror object, but was put off as I'd basically have to copy'n'paste the same code verbatim, the contribution guidelines that I skimmed did not appear to suggest how one should properly do options in this sort of scenario :/ (sorry)
Provides new option (highlightDifferences) and method highlightDifferences(bool)
to the MergeView plugin.
If true (or undefined) the original behaviour is maintained, which is to show
the differences (line highlighting and gutter graphics), if false then
the changes will not be shown.
Calling the method causes the visual change to occur 'immediately'
Signed-off-by: ciaranj ciaranj@gmail.com