Skip to content

[merge editor] Some issues with scroll sync #16946

@pisv

Description

@pisv

Bug Description:

Scrolling the merge editor vertically can sometimes cause misalignments in scroll-sync between the vertically split panes.

Steps to Reproduce:

  1. Open the 3-way merge editor with the Merge Editor (Dev): Open Merge Editor State from JSON command (which is available in the command palette, F1) using the following JSON:

    {
      "base": "1\n2\n3\n4\n5\na\n6\n7\n8\n9\n10",
      "input1": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10",
      "input2": "1\n2\n3\n4\n5\na\nb\nc\nd\ne\nf\ng\n6\n7\n8\n9\n10",
      "result": "1\n2\n3\n4\n5\na\n6\n7\n8\n9\n10"
    }
    

    This corresponds to the following merge conflict:

    Image
  2. Scroll the Left (!) pane vertically until the merge conflict is displayed at the top of the Left pane:

    Image

    Observe that, while the merge conflict is displayed at the top of each of the horizontally split panes now, the bottom (Result) pane displays the line 5 at the top. It would be expected that the merge conflict should be displayed at the top of the Result pane also in this case:

    Image
  3. Scroll the Result (!) pane vertically until the merge conflict is displayed at the top of the Result pane:

    Image

    Observe that the merge conflict is no longer displayed at the top of each of the horizontally split panes in this case, contrary to what would have been expected.

  4. Continue scrolling the Result pane vertically until the line a is displayed just near the top of the Result pane:

    Image

    Observe that the merge conflict is almost scrolled out of view in the horizontally split panes now, while it would be expected that all panes should be precisely aligned relative to the line a in this case:

    Image

Additional Information

I'm going to submit a fix.

  • Operating System: all
  • Theia Version: 1.68 (current master)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbugs found in the applicationscmissues related to the source control manager

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions