diff options
Diffstat (limited to 'src/item.go')
-rw-r--r-- | src/item.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/item.go b/src/item.go index 7c2f94d5..1eeb1802 100644 --- a/src/item.go +++ b/src/item.go @@ -86,10 +86,15 @@ func (i *Item) Rank(cache bool) Rank { // AsString returns the original string func (i *Item) AsString() string { + return *i.StringPtr() +} + +// StringPtr returns the pointer to the original string +func (i *Item) StringPtr() *string { if i.origText != nil { - return *i.origText + return i.origText } - return *i.text + return i.text } func (item *Item) colorOffsets(color int, bold bool, current bool) []colorOffset { |