mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not reformat injected document if it consists from more than one host regions
This commit is contained in:
@@ -275,6 +275,7 @@ public class CodeFormatterFacade {
|
||||
List<DocumentWindow> injectedDocuments = InjectedLanguageUtil.getCachedInjectedDocuments(file);
|
||||
if (!injectedDocuments.isEmpty()) {
|
||||
for (DocumentWindow injectedDocument : injectedDocuments) {
|
||||
if (injectedDocument.getHostRanges().length > 1) continue;
|
||||
injectedFileRangesSet.add(TextRange.from(injectedDocument.injectedToHost(0), injectedDocument.getTextLength()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user