mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
fix JsonEditingTest: don't autoinsert comma if there's no value
This commit is contained in:
@@ -66,7 +66,7 @@ public class JsonEnterHandler extends EnterHandlerDelegateAdapter {
|
||||
prevSibling = prevSibling.getPrevSibling();
|
||||
}
|
||||
|
||||
if (prevSibling instanceof JsonProperty) {
|
||||
if (prevSibling instanceof JsonProperty && ((JsonProperty)prevSibling).getValue() != null) {
|
||||
int offset = elementType == JsonElementTypes.COMMA ? nextSibling.getTextRange().getEndOffset() : prevSibling.getTextRange().getEndOffset();
|
||||
if (elementType == JsonElementTypes.R_CURLY) {
|
||||
editor.getDocument().insertString(offset, ",");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"vcs": {
|
||||
"schema": "schema://foo.bar/path"
|
||||
}
|
||||
},
|
||||
<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user