Skip to content

canScroll and marginMode #482

Description

@holzschu

In Sources/SwiftTerm/Terminal.swift, there is a variable, canScroll, defined as:

let canScroll = buffer.x >= buffer.marginLeft && buffer.x <= buffer.marginRight

But marginLeft and marginRight are only defined to something meaningful if marginMode is enabled (otherwise they're just 0 and 80, respectively).

Shouldn't this variable defined as:

let canScroll = !marginMode || (buffer.x >= buffer.marginLeft && buffer.x <= buffer.marginRight)

so that it defaults to true if marginMode is not enabled?

(This maybe a stupid question; I don't know what marginMode is and what the expected behaviour is in the terminal).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions