Skip to content

Commit

Permalink
Fix crash described in #63
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Guggenmos <[email protected]>
  • Loading branch information
slrtbtfs committed Nov 13, 2019
1 parent 0ecd2f0 commit 586ad86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion langserver/cache/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ func (d *Document) SetContent(content string, version float64, new bool) error {

d.content = content
d.version = version
d.posData.SetLinesForContent([]byte(content))

// An additional newline is appended, to make sure the last line is indexed
d.posData.SetLinesForContent(append([]byte(content), '\n'))

d.queries = []*CompiledQuery{}
d.yamls = []*YamlDoc{}
Expand Down

0 comments on commit 586ad86

Please sign in to comment.