Safe Haskell | None |
---|---|
Language | Haskell2010 |
- pagerWidget :: PagerWidget
- type PagerWidget = Widget Pager
- data Pager
- moveToLine :: Monad m => Int -> VgrepT Pager m Redraw
- scroll :: Monad m => Int -> VgrepT Pager m Redraw
- scrollPage :: Monad m => Int -> VgrepT Pager m Redraw
- hScroll :: Monad m => Int -> VgrepT Pager m Redraw
- replaceBufferContents :: Monad m => Seq Text -> [Int] -> VgrepT Pager m ()
Pager widget
pagerWidget :: PagerWidget Source #
Display lines of text with line numbers
Initial state
The pager is empty, i. e. no lines of text to display.
Drawing the pager
The lines of text are printed, starting at the current scroll position. If not enough lines are available, the scroll position is adjusted until either the screen is filled, or the first line is reached. Highlighted lines are displayed according to the config values
normalHl
andlineNumbersHl
(default: bold).Default keybindings
←↓↑→, hjkl
hScroll
(-1),scroll
1,scroll
(-1),hScroll
1 PgUp, PgDnscrollPage
(-1),scrollPage
1
type PagerWidget = Widget Pager Source #
Internal state
Keeps track of the lines of text to display, the current scroll positions, and the set of highlighted line numbers.
Widget actions
scroll :: Monad m => Int -> VgrepT Pager m Redraw Source #
Scroll up or down one line.
scroll (-1) -- scroll one line up scroll 1 -- scroll one line down
scrollPage :: Monad m => Int -> VgrepT Pager m Redraw Source #
Scroll up or down one page. The first line on the current screen will be the last line on the scrolled screen and vice versa.
scrollPage (-1) -- scroll one page up scrollPage 1 -- scroll one page down