fix bug with widgetid

This commit is contained in:
Mathew Pareles 2025-05-05 02:30:04 -07:00
parent 7dc86502e3
commit b6e3a57dc6
2 changed files with 12 additions and 13 deletions

View file

@ -2404,11 +2404,10 @@ class AcceptRejectInlineWidget extends Widget implements IOverlayWidget {
}
// Mount first, then update positions
editor.addOverlayWidget(this);
updateTop()
updateLeft()
setTimeout(() => {
updateTop()
updateLeft()
}, 0)
this._register(editor.onDidScrollChange(e => { updateTop() }))
this._register(editor.onDidChangeModelContent(e => { updateTop() }))

View file

@ -138,7 +138,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
const upButton = <button
className={`
size-2 rounded cursor-default
size-4 rounded cursor-default
hover:bg-void-bg-1-alt
`}// --border border-void-border-3 focus:border-void-border-1
disabled={upDownDisabled}
@ -149,11 +149,11 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToDiffIdx(prevDiffIdx);
}
}}
><MoveUp className='size-2' /></button>
><MoveUp className='size-4' /></button>
const downButton = <button
className={`
size-2 rounded cursor-default
size-4 rounded cursor-default
hover:bg-void-bg-1-alt
`}
disabled={upDownDisabled}
@ -164,11 +164,11 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToDiffIdx(nextDiffIdx);
}
}}
><MoveDown className='size-2' /></button>
><MoveDown className='size-4' /></button>
const leftButton = <button
className={`
size-2 rounded cursor-default
size-4 rounded cursor-default
hover:bg-void-bg-1-alt
`}
disabled={leftRightDisabled}
@ -179,11 +179,11 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToURIIdx(prevURIIdx);
}
}}
><MoveLeft className='size-2' /></button>
><MoveLeft className='size-4' /></button>
const rightButton = <button
className={`
size-2 rounded cursor-default
size-4 rounded cursor-default
hover:bg-void-bg-1-alt
`}
disabled={leftRightDisabled}
@ -194,7 +194,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => {
goToURIIdx(nextURIIdx);
}
}}
><MoveRight className='size-2' /></button>
><MoveRight className='size-4' /></button>