These are chat archives for nelsam/vidar

15th
May 2018
Samuel Nelson
@nelsam
May 15 2018 03:31
for your situation:
  1. create package command/scroll
  2. create type scroll.Scroll which is a bind.MultiOp similar to caret.Mover except for scrolling
  3. create hook scroll.OnMove which is a bind.OpHook similar to caret.OnEdit except make it scroll the text when the cursor moves by implementing caret.MovedHook
that might be overkill, honestly, but I think it should help make sure that a cursor is always in view
the scroll.OnMove should probably first check to see if one of the passed in carets is already in view before scrolling
Kvaz1r
@Kvaz1r
May 15 2018 18:02
great, thanks I'll try to do it at weekend.