incrementNextNumberByB :: Int -> BufferM ()
incrementNextNumberByB n = do
    start <- pointB
    untilB_ (not <$> isNumberB) $ moveXorSol 1
    untilB_          isNumberB  $ moveXorEol 1
    begin <- pointB
    beginIsEol <- atEol
    untilB_ (not <$> isNumberB) $ moveXorEol 1
    end <- pointB
    if beginIsEol then moveTo start
    else do modifyRegionB (increment n) (mkRegion begin end)
            moveXorSol 1

-- | Increment number in string by n.
incrementNextNumberByB :: Int -> BufferM ()
incrementNextNumberByB n = do
    start <- pointB
    untilB_ (not <$> isNumberB) $ moveXorSol 1
    untilB_          isNumberB  $ moveXorEol 1
    begin <- pointB
    beginIsEol <- atEol
    untilB_ (not <$> isNumberB) $ moveXorEol 1
    end <- pointB
    if beginIsEol then moveTo start
    else do modifyRegionB (increment n) (mkRegion begin end)
            moveXorSol 1

-- | Increment number in string by n.
incrementNextNumberByB n = do
    start <- pointB
    untilB_ (not <$> isNumberB) $ moveXorSol 1
    untilB_          isNumberB  $ moveXorEol 1
    begin <- pointB
    beginIsEol <- atEol
    untilB_ (not <$> isNumberB) $ moveXorEol 1
    end <- pointB
    if beginIsEol then moveTo start
    else do modifyRegionB (increment n) (mkRegion begin end)
            moveXorSol 1

-- | Increment number in string by n.