Skip to content

Commit

Permalink
ASTDiff GUI: Fixes #672 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
pouryafard75 authored and tsantalis committed Aug 19, 2024
1 parent 499e31b commit ac735a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/resources/web/dist/monaco.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ function monaco(config) {
));
rightEditor.getModel().decorations = rightDecorations;
rightEditor.deltaDecorations([], rightDecorations);
rightEditor.getModel().moved = config.moved;
leftEditor.getModel().moved = config.moved;
rightEditor.onMouseDown((event) => {
if (event.target.range) {
const allDecorations = rightEditor.getModel().getDecorationsInRange(event.target.range, rightEditor.id, true)
Expand Down Expand Up @@ -178,7 +180,7 @@ function getLinesToFold(config, model, margin = 5) {
const linesToKeepVisible = new Set();

decorations.forEach(decoration => {
if (config.moved){
if (model.moved){
if (decoration.options.className === "inserted" || decoration.options.className === "deleted")
{
return;
Expand Down

0 comments on commit ac735a4

Please sign in to comment.