Merge mature Profile editor with contextual Help
This commit is contained in:
@@ -100,6 +100,8 @@ type terminalPage struct {
|
||||
focusLine int
|
||||
primaryOffset int
|
||||
contextOffset int
|
||||
contextAnchor int
|
||||
anchorContext bool
|
||||
dashboard *dashboardRenderState
|
||||
}
|
||||
|
||||
@@ -236,7 +238,11 @@ func renderPageBody(page terminalPage, width, height int) string {
|
||||
contextHeight = max(1, height-primaryHeight-1)
|
||||
}
|
||||
primary := viewportContentAt(page.primary, width, primaryHeight, page.primaryOffset, page.focusLine)
|
||||
context := viewportContentAt(page.context, width, contextHeight, page.contextOffset, -1)
|
||||
contextFocus := -1
|
||||
if page.anchorContext {
|
||||
contextFocus = page.contextAnchor
|
||||
}
|
||||
context := viewportContentAt(page.context, width, contextHeight, page.contextOffset, contextFocus)
|
||||
return primary + "\n\n" + context
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user