[regular expression offset working paolo.veronelli@gmail.com**20080131134116] { hunk ./Buffer.hs 53 - fromstart w = reverse $ filter isInside (w:runner prev w) + fromstart w = reverse $ filter isInside (runner prev w) hunk ./Buffer.hs 55 + fwdcycle w = filter isInside $ runner next w ++ reverse (runner prev w) ++ [w] + bwdcycle w = filter isInside $ runner prev w ++ reverse (runner next w) ++ [w] hunk ./Editor.hs 27 +putlastre x = get >>= \y -> put y {lastre = x} hunk ./Engine.hs 65 - -- | Address the prev line + -- | Addretillend t ++ fromstart t ss the prev line hunk ./Engine.hs 82 + -- | all the next engines from the addressed one to its previous , wrapping around + fwdcycle :: a -> [a] hunk ./Engine.hs 86 + bwdcycle :: a -> [a] hunk ./Engine.hs 98 --- | all the next engines from the addressed one to its previous , wrapping around -cycle :: Engine w => w -> [w] -cycle t = tillend t ++ fromstart t + hunk ./Offset.hs 6 +import Control.Monad.State hunk ./Offset.hs 13 - -> Editor m w ( w) -- ^ the modified engine under the Editor -jumpE o = through $ how o + -> Editor m w w -- ^ the modified engine under the Editor + +jumpE Current = through Just +jumpE LastLine = through end +jumpE (Next n) = through $ nextn n +jumpE (Prev n) = through $ prevn n +jumpE (Absolute n) = through $ jump n +jumpE (ReNext s) = putlastre s >> (through . finder fwdcycle) s +jumpE LastReNext = gets lastre >>= through . finder fwdcycle +jumpE (RePrev s) = putlastre s >> (through . finder bwdcycle) s +jumpE LastRePrev = gets lastre >>= through . finder bwdcycle hunk ./Offset.hs 25 -how :: Engine w => Offset -> w -> Maybe w -how Current = Just -how LastLine = end -how (Next n) = nextn n -how (Prev n) = prevn n -how (Absolute n) = jump n -how (ReNext s) = (find ((=~ s) . fromJust . line)) . Engine.cycle -how (RePrev s) = (find ((=~ s) . fromJust . line)) . Engine.cycle hunk ./Offset.hs 26 +finder f s = find ((=~ s) . fromJust . line) . f hunk ./Parser.hs 30 - are c = do - char c - s <- many1 (noneOf "/") - char c - return s + are c = char c >> manyTill anyChar ((char c >> return ()) <|> eof) hunk ./Parser.hs 71 - <|> (parseOffset >>= return .ORO) + <|> try (parseOffset >>= return .ORO) hunk ./docs/Engine.html 307 +>fwdcycle :: a -> [a]bwdcycle :: a -> [a]cycle :: Engine w => w -> [w]Address the prev line +>Addretillend t ++ fromstart t ss the prev line hunk ./docs/Engine.html 900 +>fwdcycle :: a -> [a]all the next engines from the addressed one to its previous , wrapping around +bwdcycle :: a -> [a]cycle :: Engine w => w -> [w]all the next engines from the addressed one to its previous , wrapping around -how :: Engine w => Offset -> w -> Maybe whow :: Engine w => Offset -> w -> Maybe wbwdcycleEnginecycleEnginefwdcycleEnginehowOffset