Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

pullRequestTabScroll.ts

8 lines279 Bytes

1/** Preserve the shared header's position, then each tab's own reading position. */
2export function pullRequestTabOffset(
3 current: number,
4 saved: number | undefined,
5 headerEnd: number,
6) {
7 return current < headerEnd ? current : Math.max(headerEnd, saved ?? headerEnd);
8}