Skip to content

Commit

Permalink
#23462 Fix case when next element is equals to last element in the sm…
Browse files Browse the repository at this point in the history
…art blocks recognition logic (#23463)
  • Loading branch information
E1izabeth committed Apr 18, 2024
1 parent f22dc24 commit cae7528
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1064,7 +1064,7 @@ private boolean elementStartsProperly(@NotNull SQLScriptElement element) {
private int findSmartStatementBoundary(@NotNull SQLScriptElement element, boolean forward) {
SQLScriptElement lastElement = element;
SQLScriptElement nextElement = extractNextQueryImpl(this.context, element, forward);
while (nextElement != null && !elementStartsProperly(nextElement)) {
while (nextElement != null && !elementStartsProperly(nextElement) && nextElement.getOffset() != lastElement.getOffset()) {
lastElement = nextElement;
nextElement = extractNextQueryImpl(this.context, lastElement, forward);
}
Expand Down

0 comments on commit cae7528

Please sign in to comment.