Fix adjacent link edge case

This commit is contained in:
Daniel Imms
2022-08-07 07:42:21 -07:00
parent d9b8c6a838
commit c39d235168
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -65,7 +65,6 @@ export class OscLinkProvider implements ILinkProvider {
// These ranges are 1-based
range: {
start: {
// TODO: Adjacent links aren't working correctly
x: currentStart + 1,
y
},
@@ -80,12 +79,20 @@ export class OscLinkProvider implements ILinkProvider {
leave: linkHandler?.leave
});
}
currentStart = -1;
currentLinkId = -1;
finishLink = false;
// Clear link or start a new link if one starts immediately
if (cell.hasExtendedAttrs() && cell.extended.urlId) {
currentStart = x;
currentLinkId = cell.extended.urlId;
} else {
currentStart = -1;
currentLinkId = -1;
}
}
}
// TODO: Handle fetching and returning other link ranges to underline other links with the same id
console.log('result', result);
callback(result);
}
}