mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-52375 Smart quote doesn't work in SQL string, adds two extra quotes instead of none.
This commit is contained in:
@@ -266,7 +266,13 @@ public class TypedHandler implements TypedActionHandler {
|
||||
for (DocumentWindow documentWindow : InjectedLanguageUtil.getCachedInjectedDocuments(oldFile)) {
|
||||
if (documentWindow.isValid() && documentWindow.containsRange(offset, offset)) {
|
||||
PsiFile injectedFile = PsiDocumentManager.getInstance(oldFile.getProject()).getPsiFile(documentWindow);
|
||||
return InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile);
|
||||
final Editor injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile);
|
||||
// IDEA-52375 fix: last quote sign should be handled by outer language quote handler
|
||||
if (injectedEditor.getCaretModel().getOffset() == injectedEditor.getDocument().getTextLength() &&
|
||||
charTyped == editor.getDocument().getCharsSequence().charAt(offset)) {
|
||||
return editor;
|
||||
}
|
||||
return injectedEditor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user