A component for bubbletea.
Crops view from string given position and size.
With ANSI SGR support.
For Usage checkout examples
Keymaps are inside the model struct, can be changed if you want to.
Default keymaps:
j
move down 1 linek
move up 1 linectrl+d
move down half pagectrl+u
move up half pageh
move left 1 columnl
move right 1 columnH
move left half rowL
move right half row
- if not enough place for a char width over 1, the char will not display and replaced to (multiple) white space.
TAB(\t)
will be replaced by 4SPACE( )
, and it's hard coded, not sure ifprocessRune
should be available to access from the outside
So, this is actually the first time i use go
to make stuffs for others to use.
Any suggestion is welcomed here