Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix unit test failure from pull request #4878. Added unit test for hiding Active Line highlight when editor has selection. #4927

Merged
merged 2 commits into from
Aug 26, 2013

Conversation

lkcampbell
Copy link
Contributor

Here's the fix for the unit test errors caused by pull request #4878. I moved the check out of the toggle command code and into the _setEditorOption() code per the suggestion of @jasonsanjose.

I also added a new unit test to check for the temporary hiding of the Active Line Highlight when there is an editor selection. Tested the positive and negative scenarios. Ran the entire test suite. Everything looks good. There are still quite a few errors in the unit test suite right now, but none appear to be related to my changes.

@lkcampbell
Copy link
Contributor Author

@RaymondLim and @jasonsanjose, here's the new unit test and the fix for the old unit test failure.

@ghost ghost assigned RaymondLim Aug 26, 2013
@@ -1478,6 +1478,14 @@ define(function (require, exports, module) {
function _setEditorOption(value, cmOption) {
_instances.forEach(function (editor) {
editor._codeMirror.setOption(cmOption, value);

// If there is a selection in the editor, temporarily hide Active Line Highlight
if ((cmOption === "styleActiveLine") && (value === true)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to have this here since it takes care of all editors, not just the main editor that you took care of in your previous implementation.

@RaymondLim
Copy link
Contributor

Travis build passed after I restarted. Merging now.

RaymondLim added a commit that referenced this pull request Aug 26, 2013
Fix unit test failure from pull request #4878.  Added unit test for hiding Active Line highlight when editor has selection.
@RaymondLim RaymondLim merged commit a3b84f9 into adobe:master Aug 26, 2013
@lkcampbell lkcampbell deleted the unit-test-4778 branch August 27, 2013 03:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants