Skip to content

useStdoutDimensions doesn't refresh the ref when resizing the terminal #51

@gabrielhamel

Description

@gabrielhamel

Is it the culprit ?

It seems that stdout isn't reactive at all

export function useStdoutDimensions() {
const { stdout } = useStdout()
const width = ref(stdout.columns)
const height = ref(stdout.rows)
onResize(() => {
width.value = stdout.columns
height.value = stdout.rows
})
return [width, height]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions