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

The comparison function doesn't work #25

Open
zd-project opened this issue May 3, 2016 · 22 comments · Fixed by #28
Open

The comparison function doesn't work #25

zd-project opened this issue May 3, 2016 · 22 comments · Fixed by #28

Comments

@zd-project
Copy link

screen shot 2016-05-03 at 2 47 04 pm

There's not any highlights and comments concerning the difference between two HTML files.

Is this some kind of bug or just that I use it the wrong way?

@bomsy
Copy link
Owner

bomsy commented May 3, 2016

There might be some conflicts with another extension. try to disable the others and see.

@tallchap67
Copy link

I have the same issue. You click the icon and the new pane appears empty. I have disabled all other extensions and the issue remains.

@davehallowell
Copy link

Yes. I have the exact same problem. Too bad. I don't see any other extension that can be used to compare.

@crezaii
Copy link

crezaii commented May 10, 2016

Same issue. Doesn't highlight even with all other extensions disabled.

@npoku
Copy link

npoku commented May 10, 2016

confirming +1

@bomsy
Copy link
Owner

bomsy commented May 11, 2016

Looking into this. what versions of brackets are you guys using?

@crezaii
Copy link

crezaii commented May 11, 2016

I'm using the latest version: 1.6.

@davehallowell
Copy link

I am using Release 1.6 build 1.6.0-16680.

@xuefengwork
Copy link

same issue on version1.6

@zd-project
Copy link
Author

Release 1.6 build 1.6.0-16680 (release 3df0ac6fa)
Thanks for taking care of this. Let me know if I should provide additional information.

@ngrisouard
Copy link

Same here, same release as ZDProject. Tried with all other extensions disabled as well, but it won't work.

@dterrazas
Copy link

I had the same issue...nothing changed when I clicked compare. I disable the only other extension I had installed (Extract for Brackets) and now when I click the compare button it opens in a full white screen where I can see a little bit of code but completely unusable.

capture

@anton-bot
Copy link
Contributor

anton-bot commented Jul 5, 2016

tl;dr: probably won't fix

I was having the same issue. Clicking the compare button doesn't do anything. Disabled all other extensions, didn't help too.

Here is the error in the javascript console that is logged when I click the Compare button:

/thirdparty/CodeMirror/lib/codemirror.js:187 Uncaught TypeError: Cannot read property 'first' of null
Display @ /thirdparty/CodeMirror/lib/codemirror.js:187
CodeMirror @ /thirdparty/CodeMirror/lib/codemirror.js:74
CodeMirror @ /thirdparty/CodeMirror/lib/codemirror.js:62
CodeMirror.MergeView @ cm_merge.js:471
CodeMirror.MergeView @ cm_merge.js:439
(anonymous function) @ main.js:116
switchCompareMode @ main.js:56
(anonymous function) @ main.js:111
n.event.dispatch @ thirdparty.min.js:20
r.handle @ thirdparty.min.js:20

Using Brackets Release 1.7 build 1.7.0-16898 (release b0a363b71).

When debugging the main.js of this extension (brackets-compare), it seems that mFile and oFile in lines 94-127 are not null, but their _contents property is null.

image

This is because of this code in Brackets:

            // Only cache data for watched files
            if (watched) {
                this._stat = stat;
                this._contents = data;
            }

That means that this extension won't work unless you select the directory where the files are located. Users need to click "Open Folder" in the left pane of Brackets, and select the files to compare from that folder only.

@anton-bot anton-bot mentioned this issue Jul 5, 2016
@bradanlane
Copy link

bradanlane commented Jul 12, 2016

"you select the directory where the files are located. Users need to click "Open Folder" in the left pane of Brackets, and select the files to compare from that folder only."

For further clarification, the does not work on files in subfolders of the selected folder. As @j3qq4 describes, you must first "Open folder ..." and select the folder that directly has the files to compare.

This makes is good for single files but not for projects. Even with single files, it would be helpful to be able to compare files from different directories. (not being an 'extensions developer', I am not sure how difficult this will be)

@bomsy bomsy closed this as completed in #28 Jul 19, 2016
bomsy added a commit that referenced this issue Jul 19, 2016
@bomsy
Copy link
Owner

bomsy commented Jul 19, 2016

hey guys, I've released v 0.2.5. Please update and see if issues are fix.

@bomsy bomsy reopened this Jul 19, 2016
@bomsy
Copy link
Owner

bomsy commented Jul 19, 2016

latest version is 0.2.6, Should fix all issues.

@SkellyCT
Copy link

Well I'm now on 0.2.7 and it still doesn't work unfortunately.

@bomsy
Copy link
Owner

bomsy commented Jul 23, 2016

what issue are you getting?

@SkellyCT
Copy link

It simply doesn't do anything. Doesn't compare. I have updated to all the latest versions.
I have two documents open but when I click on the compare icon nothing happens. I used existing long ones and tried new short ones to test. Nothing.

On 23. Juli 2016 at 15:02:19, Hubert Boma Manilla ([email protected](mailto:[email protected])) wrote:

what issue are you getting?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub(#25 (comment)), or mute the thread(https://github.com/notifications/unsubscribe-auth/ARim1-M5PD4wJYMnNZ4YiWF-22Ly-TtGks5qYhDbgaJpZM4IV9-J).

@anton-bot
Copy link
Contributor

@SkellyCT you should press F12 to see if there are any error in the javascript console.

@bomsy
Copy link
Owner

bomsy commented Jul 25, 2016

@SkellyCT Ur probably getting a specific issue. pls could you press F12 as mention by @j3qq4, and let me know so i can fix it up for you. thanks!!

@webs05
Copy link

webs05 commented Aug 1, 2018

Just in case it helps someone else in the future, I had to save the files first before the comparison plugin worked. IE, you can't just copy paste stuff into an unsaved file and click diff icon.

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 a pull request may close this issue.