[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reformatting man pages at SIGWINCH
From: |
Ralph Corderoy |
Subject: |
Re: reformatting man pages at SIGWINCH |
Date: |
Sat, 08 Apr 2023 12:40:14 +0100 |
Hi,
> > > (1) what part of the screen was the reader actually looking at?
less(1) has -j; that would be a good start.
> > > (2) how is the pager supposed to know how to map any given
> > > location on the screen back to a place in the unrendered source
> > > document so it can be accurately found when the document is
> > > rerendered?
I would assume the pager looks for the same place in its input, not in
the man-page source. It keeps seeking forward to the best matching run
of words, jumping to the best so far.
Problems I can think of:
- the formatter's input may be ephemeral and so need buffering,
- the originator may not have intended that and limited its size,
- seeking the best match after being WINCH'd must also buffer and may
never reach EOF,
- the input formatter may alter its output based on the terminal's size,
e.g. a pic(1) diagram disappears, and
- a solution which re-starts the pager loses the pager's ephemeral
settings.
I expect more would be found in practice.
--
Cheers, Ralph.
- reformatting man pages at SIGWINCH (was: Playground pager lsp(1)), Alejandro Colomar, 2023/04/07
- Re: reformatting man pages at SIGWINCH, Dirk Gouders, 2023/04/07
- Re: reformatting man pages at SIGWINCH, Alejandro Colomar, 2023/04/07
- Re: reformatting man pages at SIGWINCH, Dirk Gouders, 2023/04/10
- Re: reformatting man pages at SIGWINCH, Alejandro Colomar, 2023/04/10
- Re: reformatting man pages at SIGWINCH, G. Branden Robinson, 2023/04/10
- Re: reformatting man pages at SIGWINCH, Ralph Corderoy, 2023/04/11
- Re: reformatting man pages at SIGWINCH, Dirk Gouders, 2023/04/11
- Re: reformatting man pages at SIGWINCH, G. Branden Robinson, 2023/04/17
Re: reformatting man pages at SIGWINCH,
Ralph Corderoy <=