mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
accept/reject on right
This commit is contained in:
parent
6e8498414c
commit
e888f261fe
2 changed files with 12 additions and 4 deletions
|
|
@ -1522,10 +1522,19 @@ class AcceptRejectWidget extends Widget implements IOverlayWidget {
|
|||
this._domNode.style.top = `${topPx}px`
|
||||
}
|
||||
const updateLeft = () => {
|
||||
const leftPx = 0//editor.getScrollLeft() - editor.getScrollWidth()
|
||||
this._domNode.style.left = `${leftPx}px`
|
||||
const layoutInfo = editor.getLayoutInfo();
|
||||
const minimapWidth = layoutInfo.minimap.minimapWidth;
|
||||
const verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;
|
||||
const buttonWidth = this._domNode.offsetWidth;
|
||||
|
||||
const leftPx = layoutInfo.width - minimapWidth - verticalScrollbarWidth - buttonWidth;
|
||||
this._domNode.style.left = `${leftPx}px`;
|
||||
}
|
||||
|
||||
// Mount first, then update positions
|
||||
editor.addOverlayWidget(this);
|
||||
|
||||
|
||||
updateTop()
|
||||
updateLeft()
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ export const QuickEditChat = ({ diffareaid, onGetInputBox, onUserUpdateText, onC
|
|||
rounded-md
|
||||
bg-vscode-input-bg
|
||||
border border-void-border-3 focus-within:border-void-border-1 hover:border-void-border-1
|
||||
`
|
||||
}
|
||||
`}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
onSubmit(e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue