yi-core-0.13.7: Yi editor core library

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Yi.Buffer

Description

The Buffer module defines monadic editing operations over one-dimensional buffers, maintaining a current point.

This module acts as a facade for the Buffer.* modules.

Synopsis

Documentation

data UIUpdate Source #

Constructors

TextUpdate !Update 
StyleUpdate !Point !Size 

Instances

Generic UIUpdate Source # 

Associated Types

type Rep UIUpdate :: * -> * #

Methods

from :: UIUpdate -> Rep UIUpdate x #

to :: Rep UIUpdate x -> UIUpdate #

Binary UIUpdate Source # 

Methods

put :: UIUpdate -> Put #

get :: Get UIUpdate #

putList :: [UIUpdate] -> Put #

type Rep UIUpdate Source # 
type Rep UIUpdate = D1 (MetaData "UIUpdate" "Yi.Buffer.Implementation" "yi-core-0.13.7-DTjAbLZEXyiAvGCue8BBeY" False) ((:+:) (C1 (MetaCons "TextUpdate" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Update))) (C1 (MetaCons "StyleUpdate" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Point)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Size)))))

data Update Source #

Mutation actions (also used the undo or redo list)

For the undoredo, we use the partial checkpoint/ (Berlage, pg16) strategy to store just the components of the state that change.

Note that the update direction is only a hint for moving the cursor (mainly for undo purposes); the insertions and deletions are always applied Forward.

Note that keeping the text does not cost much: we keep the updates in the undo list; if it's a Delete it means we have just inserted the text in the buffer, so the update shares the data with the buffer. If it's an Insert we have to keep the data any way.

Constructors

Insert 

Fields

Delete 

Fields

Instances

Show Update Source # 
Generic Update Source # 

Associated Types

type Rep Update :: * -> * #

Methods

from :: Update -> Rep Update x #

to :: Rep Update x -> Update #

Binary Update Source # 

Methods

put :: Update -> Put #

get :: Get Update #

putList :: [Update] -> Put #

type Rep Update Source # 
type Rep Update = D1 (MetaData "Update" "Yi.Buffer.Implementation" "yi-core-0.13.7-DTjAbLZEXyiAvGCue8BBeY" False) ((:+:) (C1 (MetaCons "Insert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "updatePoint") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Point)) ((:*:) (S1 (MetaSel (Just Symbol "updateDirection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Direction)) (S1 (MetaSel (Just Symbol "_insertUpdateString") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 YiString))))) (C1 (MetaCons "Delete" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "updatePoint") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Point)) ((:*:) (S1 (MetaSel (Just Symbol "updateDirection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Direction)) (S1 (MetaSel (Just Symbol "_deleteUpdateString") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 YiString))))))

markGravityAA :: Lens' MarkValue Direction Source #

markPointAA :: Lens' MarkValue Point Source #