graphql-language-service-interface
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -29,3 +29,2 @@ 'use strict'; | ||
*/ | ||
function getAutocompleteSuggestions(schema, queryText, cursor, contextToken) { | ||
@@ -282,8 +281,8 @@ var token = contextToken || getTokenAtPosition(queryText, cursor); | ||
if (index === cursor.line) { | ||
if (stream.getCurrentPosition() > cursor.character) { | ||
if (stream.getCurrentPosition() >= cursor.character) { | ||
styleAtCursor = style; | ||
stateAtCursor = _extends({}, state); | ||
stringAtCursor = stream.current(); | ||
return 'BREAK'; | ||
} | ||
styleAtCursor = style; | ||
stateAtCursor = _extends({}, state); | ||
stringAtCursor = stream.current(); | ||
} | ||
@@ -322,3 +321,2 @@ }); | ||
stream = new _graphqlLanguageServiceParser.CharacterStream(lines[i]); | ||
// Stop the parsing when the stream arrives at the current cursor position | ||
while (!stream.eol()) { | ||
@@ -332,2 +330,6 @@ style = parser.token(stream, state); | ||
// Above while loop won't run if there is an empty line. | ||
// Run the callback one more time to catch this. | ||
callback(stream, state, style, i); | ||
if (!state.kind) { | ||
@@ -334,0 +336,0 @@ state = parser.startState(); |
{ | ||
"name": "graphql-language-service-interface", | ||
"repository": "https://github.com/graphql/graphql-language-service", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Interface to the GraphQL Language Service", | ||
@@ -30,7 +30,7 @@ "contributors": [ | ||
"graphql": "^0.10.1", | ||
"graphql-language-service-config": "0.0.14", | ||
"graphql-language-service-parser": "0.0.13", | ||
"graphql-language-service-types": "0.0.19", | ||
"graphql-language-service-utils": "0.0.14" | ||
"graphql-language-service-config": "0.0.15", | ||
"graphql-language-service-parser": "0.0.14", | ||
"graphql-language-service-types": "0.0.20", | ||
"graphql-language-service-utils": "0.0.15" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
89883
1209
+ Addedgraphql-language-service-config@0.0.15(transitive)
+ Addedgraphql-language-service-parser@0.0.14(transitive)
+ Addedgraphql-language-service-types@0.0.20(transitive)
+ Addedgraphql-language-service-utils@0.0.15(transitive)
- Removedgraphql-language-service-config@0.0.14(transitive)
- Removedgraphql-language-service-parser@0.0.13(transitive)
- Removedgraphql-language-service-types@0.0.19(transitive)
- Removedgraphql-language-service-utils@0.0.14(transitive)