Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: grafana/jsonnet-language-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.0
Choose a base ref
...
head repository: grafana/jsonnet-language-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.1
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Sep 12, 2022

  1. Fix index access panic (#74)

    * Fix index access panic
    Oops, the second "if" crashes
    
    * Remove empty line
    julienduchesne authored Sep 12, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7938ac0 View commit details
  2. Update Nix

    julienduchesne committed Sep 12, 2022
    2
    Copy the full SHA
    3df7d72 View commit details
Showing with 2 additions and 5 deletions.
  1. +1 −1 nix/default.nix
  2. +1 −4 pkg/server/server.go
2 changes: 1 addition & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
with pkgs;
buildGoModule rec {
pname = "jsonnet-language-server";
version = "0.8.0";
version = "0.9.1";

ldflags = ''
-X main.version=${version}
5 changes: 1 addition & 4 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
@@ -93,10 +93,7 @@ func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDo
splitOldText := strings.Split(oldText, "\n")
splitNewText := strings.Split(doc.item.Text, "\n")
for index, oldLine := range splitOldText {
if index >= len(splitNewText) {
doc.linesChangedSinceAST[index] = true
}
if oldLine != splitNewText[index] {
if index >= len(splitNewText) || oldLine != splitNewText[index] {
doc.linesChangedSinceAST[index] = true
}
}