mirror of https://github.com/sbt/sbt.git
Fix #3161: Don't fail if group is not present
This covers the case described in #1361 plus an esoteric case too. Parsers are initialized when sbt starts and text completions use the knowledge at that time. If we happen to move a new file that should influence the behaviour of the tab completion, that file will not be picked up. Before, since we were throwing an error, the previous case that would no produce any tab completion would also fail, though the files are legitimately in the correct place.
This commit is contained in:
parent
e69436adde
commit
70cf417525
|
|
@ -70,7 +70,7 @@ object Scripted {
|
|||
else dropped.take(pageSize)
|
||||
}
|
||||
def nameP(group: String) = {
|
||||
token("*".id | id.examples(pairMap(group)))
|
||||
token("*".id | id.examples(pairMap.getOrElse(group, Set.empty[String])))
|
||||
}
|
||||
val PagedIds: Parser[Seq[String]] =
|
||||
for {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ object ScriptedPlugin extends AutoPlugin {
|
|||
else dropped.take(pageSize)
|
||||
}
|
||||
def nameP(group: String) = {
|
||||
token("*".id | id.examples(pairMap(group)))
|
||||
token("*".id | id.examples(pairMap.getOrElse(group, Set.empty[String])))
|
||||
}
|
||||
val PagedIds: Parser[Seq[String]] =
|
||||
for {
|
||||
|
|
|
|||
Loading…
Reference in New Issue