Skip to content

Improve page mode #264

Description

@rschmitt

Is your feature request related to a problem? Please describe.

Various commands like TYPE, LIST, and DIR support the P flag, which causes output to emitted through a basic pager (basically a more clone). There are two issues with the pager:

  1. It only scrolls down one screen at a time; it cannot page up or scroll line-by-line, as modern pagers can. It might not be possible to get all of the lines I want to see together on a single screen, even if they would physically fit.
  2. Quitting page mode via Q causes the first two lines of output to scroll off the screen when the BASIC interpreter prints its READY prompt. This can defeat the use of handy shortcuts like / and that work with DIR output.

Describe the solution you'd like

All of the following would be useful to me:

  1. Support for paging up, as well as down (perhaps with the left and right cursor keys)
  2. Support for scrolling line-by-line (probably with the up and down cursor keys)
  3. One of the following:
    1. Support for scrolling up past the start of the document, in order to bring the lines I need closer to the bottom of the screen.
    2. Rendering each screen with a two-line gutter at the bottom, so that all output is preserved upon quit.

Describe alternatives you've considered

Line ranges (like LIST supports) would address several of my use cases, since they can be used like head, or to view an arbitrary range of lines when the line numbers are known. To get the most out of this, the pager would probably need to support displaying line numbers, and then we would have two types of line numbers: physical line numbers, and logical/explicit line numbers for BASIC programs. So a souped-up pager seems like the cleaner solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions