Skip to content

Commit

Permalink
'Fix' #1600
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPirates committed Oct 1, 2020
1 parent 15e3d4f commit ad1baf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nl/hannahsten/texifyidea/util/PsiCommands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fun LatexCommands.getRequiredArgumentValueByName(argument: String): String? {
.indexOfFirst { arg -> arg.name == argument }
}
return if (requiredArgIndices.isNullOrEmpty() || requiredArgIndices.all { it == -1 }) null
else requiredParameters[min(requiredArgIndices.first(), requiredParameters.size - 1)]
else requiredParameters.getOrNull(min(requiredArgIndices.first(), requiredParameters.size - 1))
}

/**
Expand Down

0 comments on commit ad1baf9

Please sign in to comment.