Skip to content

Commit 744fb6a

Browse files
authored
diff: the prompt hint reads the viewport's layout through a type that may lack it (#94843)
1 parent b782847 commit 744fb6a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎mods/diff/hooks/register.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,14 @@ export function register(on: On) {
621621

622622
on('ui.render', { component: 'PromptHint' }, ($, e, next) => {
623623
if (isOnPaneSurface(e)) {
624-
columns = e.viewport?.columns ?? columns
624+
const viewport: { columns?: number; isFullscreen?: boolean } | undefined =
625+
e.viewport
626+
627+
columns = viewport?.columns ?? columns
625628

626629
model = {
627630
...model,
628-
isFullscreen: e.viewport?.isFullscreen ?? model.isFullscreen,
631+
isFullscreen: viewport?.isFullscreen ?? model.isFullscreen,
629632
}
630633
}
631634

0 commit comments

Comments
 (0)