Skip to content

Commit

Permalink
Incorrect auto-insertion of } on Enter #216 : implementation attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jul 5, 2024
1 parent 211575c commit 8503909
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ protected Pair<PsiElement, Integer> calculateOffsetToInsertClosingBrace(

System.out.println("awkStatement="+awkStatement.getTextLength());
System.out.println("awkStatement="+awkStatement.getText());
return Pair.create(null, offset + awkStatement.getTextLength());


// int pos = offset + awkStatement.getTextLength();
int pos = offset + (awkStatement.getText().trim()).length();

System.out.println("res="+text.subSequence(0, pos) + "<here>" + text.subSequence(pos, text.length()));

return Pair.create(null, pos);
}
}

0 comments on commit 8503909

Please sign in to comment.