Skip to content

Commit

Permalink
Fixed multicolor's candidates
Browse files Browse the repository at this point in the history
Fixed that multicolor candidates did not have the latest history.
  • Loading branch information
noborus committed Oct 10, 2023
1 parent f74d6d3 commit c298e7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions oviewer/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ func (m *Document) setSectionDelimiter(delm string) {

// setMultiColorWords set multiple strings to highlight with multiple colors.
func (m *Document) setMultiColorWords(words []string) {
m.MultiColorWords = words
m.multiColorRegexps = multiRegexpCompile(words)
}

Expand Down
6 changes: 2 additions & 4 deletions oviewer/input_multicolor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ func (root *Root) setMultiColorMode() {
input.value = ""
input.cursorX = 0

searches := root.searchCandidates(searchCandidateListLen)
input.MultiColorCandidate.toLast(strings.Join(searches, " "))
old := root.Doc.MultiColorWords
input.MultiColorCandidate.toLast(strings.Join(old, " "))
list := root.searchCandidates(searchCandidateListLen)
str := strings.Join(list, " ")
input.MultiColorCandidate.toLast(str)

input.Event = newMultiColorEvent(input.MultiColorCandidate)
}

Expand Down

0 comments on commit c298e7c

Please sign in to comment.