mirror of https://github.com/sbt/sbt.git
Preserve errors order when publishing diagnostics
The `sbt-server` was prepending a new probem and not appending. The result was a `textDocument/publishDiagnostics` notification containing a inverted list of problems compare to what was show in the sbt console.
This commit is contained in:
parent
f514f4fb78
commit
a5388fed60
|
|
@ -51,7 +51,7 @@ class LanguageServerReporter(
|
|||
val pos = problem.position
|
||||
pos.sourceFile.toOption foreach { sourceFile: File =>
|
||||
problemsByFile.get(sourceFile) match {
|
||||
case Some(xs: List[Problem]) => problemsByFile(sourceFile) = problem :: xs
|
||||
case Some(xs: List[Problem]) => problemsByFile(sourceFile) = xs :+ problem
|
||||
case _ => problemsByFile(sourceFile) = List(problem)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue