modCurLine :: Buffer b => (Int -> Int) -> Editor b ()
modCurLine f = do
  l  <- getCurLine
  nl <- onBuffer numLines
  setCurLine . max 0 . min (nl - 1) $ f l
modCurLine :: Buffer b => (Int -> Int) -> Editor b ()
modCurLine f = do
  l  <- getCurLine
  nl <- onBuffer numLines
  setCurLine . max 0 . min (nl - 1) $ f l
modCurLine f = do
  l  <- getCurLine
  nl <- onBuffer numLines
  setCurLine . max 0 . min (nl - 1) $ f l