Skip to content

Commit

Permalink
Fixed subtle bug in save request back to requester file
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebebak committed Oct 12, 2017
1 parent 0c17463 commit 7068380
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -484,9 +484,9 @@ Requester lints your query and displays syntax errors with their line and column

Autocomplete depends on [graphql-py](https://github.com/ivelum/graphql-py/), a package you can install as an extension to Requester. See [this section](#import-any-python-package-with-requester) for more details.

>If autocomplete doesn't work, it's probably being overridden by another autocomplete package, like [All Autocomplete](https://github.com/alienhard/SublimeAllAutocomplete), [Djaneiro](https://github.com/squ1b3r/Djaneiro), [tern_for_sublime](https://github.com/ternjs/tern_for_sublime), etc. Remove these packages, or disable them for Requester response views if possible.
>If autocomplete doesn't work, it's probably being overridden by another autocomplete package, like __All Autocomplete__, __tern_for_sublime__, etc. Remove these packages, or disable them for Requester response views if possible.
>GraphQL autocomplete will never override autocompletions defined by your other packages.
>GraphQL autocomplete will never override autocompletions provided by your other packages.

## Import Any Python Package with Requester
Expand Down
2 changes: 1 addition & 1 deletion commands/request.py
Expand Up @@ -570,7 +570,7 @@ def save_request():
# simply calling `requester_view.replace` corrupts `view`s settings
requester_view.run_command(
'requester_replace_text',
{'text': request, 'start_index': start_index, 'end_index': start_index + len(request)})
{'text': request, 'start_index': start_index, 'end_index': start_index + len(old_request)})
requester_view.sel().clear()
requester_view.sel().add(sublime.Region(start_index))
if not is_open: # hacky trick to make sure scroll works
Expand Down
4 changes: 2 additions & 2 deletions docs/_content/body.md
Expand Up @@ -397,9 +397,9 @@ Requester lints your query and displays syntax errors with their line and column

Autocomplete depends on [graphql-py](https://github.com/ivelum/graphql-py/), a package you can install as an extension to Requester. See [this section](#import-any-python-package-with-requester) for more details.

>If autocomplete doesn't work, it's probably being overridden by another autocomplete package, like [All Autocomplete](https://github.com/alienhard/SublimeAllAutocomplete), [Djaneiro](https://github.com/squ1b3r/Djaneiro), [tern_for_sublime](https://github.com/ternjs/tern_for_sublime), etc. Remove these packages, or disable them for Requester response views if possible.
>If autocomplete doesn't work, it's probably being overridden by another autocomplete package, like __All Autocomplete__, __tern_for_sublime__, etc. Remove these packages, or disable them for Requester response views if possible.
>GraphQL autocomplete will never override autocompletions defined by your other packages.
>GraphQL autocomplete will never override autocompletions provided by your other packages.

## Import Any Python Package with Requester
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Expand Up @@ -26,5 +26,6 @@
"2.17.0": "messages/2.17.0.txt",
"2.18.0": "messages/2.18.0.txt",
"2.19.0": "messages/2.19.0.txt",
"2.19.1": "messages/2.19.1.txt"
"2.19.1": "messages/2.19.1.txt",
"2.19.2": "messages/2.19.2.txt"
}
4 changes: 4 additions & 0 deletions messages/2.19.2.txt
@@ -0,0 +1,4 @@
# Bug Fix
It's taken me a while to get "save request back to requester file" exactly right, but it's finally good to go.

This fixes a bug that would replace either too many or too few characters in the original response view.

0 comments on commit 7068380

Please sign in to comment.