Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditorCell ¶
EditorCell represents a rune and arbitrary many flags which are associated with tags in a Tags container. This is a memory-efficient storage of tags over regions, though not as memory-efficient as intervals. A previous implementation used an interval tree and a different tag system but it turned out to be too complex for handling editing operation.
type TagMap ¶
type TagMap struct {
// contains filtered or unexported fields
}
TagMap is a concurrent store with flags as key and tags as values.
func (*TagMap) Get ¶
func (c *TagMap) Get(flag EditorFlag) (Tag, bool)
Get returns a single tag and true for a given flag, false when there is no tag for the flag as key.
func (*TagMap) GetAll ¶
func (c *TagMap) GetAll(flags []EditorFlag) []Tag
GetAll returns all tags associated with the given flags. If there is no corresponding mapping, then no tag is added.
func (*TagMap) Remove ¶
func (c *TagMap) Remove(flag EditorFlag)
Remove deletes the tag for the given flag.
func (*TagMap) Set ¶
func (c *TagMap) Set(flag EditorFlag, tag Tag)
Set associates a flag with a tag in the container.