Skip to content

Commit

Permalink
Improve logging for add label intention (#3126)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPirates committed Dec 25, 2023
1 parent 5f99336 commit cea916e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ abstract class LatexAddLabelIntention(name: String) : TexifyIntentionBase(name)
// setOptionalParameter should create an appropriate optionalArgument node with label={text} in it
val parameterText =
parameter?.keyValValue?.keyValContentList?.firstOrNull()?.parameterGroup?.parameterGroupText?.parameterTextList?.firstOrNull()
?: throw AssertionError("parameter created by setOptionalParameter does not have the right structure")
?: throw AssertionError("parameter created by setOptionalParameter for $command with text ${label.labelText} does not have the right structure: ${parameter?.text}")
// Move the caret onto the label
editor.caretModel.moveToOffset(parameterText.textOffset + label.prefix.length + 1)
val renamer = LabelInplaceRenamer(parameterText, editor, label.prefixText, label.base, moveCaretTo)
Expand Down

0 comments on commit cea916e

Please sign in to comment.