Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setCachedSize(tab: Tab, { rows, cols }: { rows: number; cols: number }) {
tab['_kui_pty_cachedSize'] = {
rows,
cols,
sidecarState: getSidecarState(tab),
resizeGeneration
}
}
function getCachedSize(tab: Tab): Size {
const cachedSize: Size = tab['_kui_pty_cachedSize']
if (
cachedSize &&
cachedSize.sidecarState === getSidecarState(tab) &&
cachedSize.resizeGeneration === resizeGeneration
) {
return cachedSize
}
}
function setCachedSize(tab: Tab, { rows, cols }: { rows: number; cols: number }) {