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

Bogus middle column displayed when comparing two files #26

Open
bvanderw opened this issue Mar 25, 2024 · 2 comments
Open

Bogus middle column displayed when comparing two files #26

bvanderw opened this issue Mar 25, 2024 · 2 comments

Comments

@bvanderw
Copy link

I am using the latest versions of VS Code, the extension (1.0.7), and Beyond Compare 5. I am seeing this issue on both Windows and macOS.

If I select two files and then select 'Compare Selected Items' from the BC context menu, the tab label is 'for testing purposes' and a bogus middle column is displayed (like it was a merge).

The filename actually contains the name of another file that exists in the project, but there is a File Not Found error displayed, along with this text:

/function (old_index, new_index) {
    / Shortcut helper to move item to end of array
    if (-1 === new_index) {
        new_index = this.length - 1;
    }

    if (new_index >= this.length) {
        var k = new_index - this.length;
        while (k-- + 1) {
            this.push(undefined);
        }
    }
    this.splice(new_index, 0, this.splice(old_index, 1)[0]);
    return this; / for testing purposes
}
@boramis
Copy link
Collaborator

boramis commented Mar 25, 2024

I can't repeat that here. Can you provide some more details on what your doing and what the selection is? Are you selecting two files in the "Explorer" treeview and right clicking on one of them or opening the Beyond Compare menu a different way? If you right click on just a single file does the "Beyond Compare" menu include a "Compare to Left File" command or just "Select Left File"?

This seems like it's using the contents of a previous "Select Highlighted Text as Left File" command, but if I do that and then launch a compare as above it's still only opening a two-sided comparison for me.

Looking at the code, the only way I can see that it could trigger a 3-way comparison is if "Compare Selected" is called with a selection containing 3 files, but the command isn't enabled in that case. Maybe try uninstalling the extension, restarting VSCode, then reinstalling it?

@iliyansi
Copy link

I have simillar issue, i have following test scenarios:

  • vscode file explorer > right click file > beyond compare > select left file
  • vscode file explorer > right click file > beyoun compare > compare to left file

opens "Beyond Compare with file not found and following text in the midle column

function(e,t=!1){return this.sort(((a,r)=>{const i=e(a),n=e(r),o=t?-1:1;returnstring==typeof i&&string==typeof n?oi.localeCompare(n):number==typeof i&&number==typeof n?o(i-n):0})),this}

same scenario happens if i select parent folders of the files

After disabled all extension and enabled just Beyond Compare it worked as expected. So i've enabled all extensions and start disable one at a time and for the one that causes this to happen is SARIF Viewer by Microsoft. Strange thing was that on different repository even with this extension enabled Beyond Copmare worked as expected.

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

No branches or pull requests

3 participants