Explicitly set focus on insert (#285)

Adds a flag to the insert layout action to explicitly set the focus of a
newly inserted node. This also adds a flag in the starter layout to
focus on the terminal block.
This commit is contained in:
Evan Simkowitz
2024-08-27 23:16:07 -07:00
committed by GitHub
parent a3aa941b68
commit fb65ec1e23
10 changed files with 25 additions and 7 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ func (ws *WshServer) CreateBlockCommand(ctx context.Context, data wshrpc.Command
wlayout.QueueLayoutActionForTab(ctx, tabId, waveobj.LayoutActionData{
ActionType: wlayout.LayoutActionDataType_Insert,
BlockId: blockRef.OID,
Magnified: &data.Magnified,
Magnified: data.Magnified,
Focused: true,
})
return &waveobj.ORef{OType: waveobj.OType_Block, OID: blockRef.OID}, nil
}