[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 1125c2136d 055/122: extend graphql-current-op
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 1125c2136d 055/122: extend graphql-current-operation to support 'line' boundary if sexp fail |
Date: |
Sat, 29 Jan 2022 08:03:32 -0500 (EST) |
branch: elpa/graphql-mode
commit 1125c2136df99caa4eaa69fbc6172cd061f24972
Author: Tim Shiu <punshiu@fb.com>
Commit: Tim Shiu <punshiu@fb.com>
extend graphql-current-operation to support 'line' boundary if sexp fail
---
graphql-mode.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index 04720f27c4..67ebaba4eb 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -124,7 +124,15 @@ of the variables used in the query."
(save-excursion
(graphql-end-of-query)
(point))))
- (buffer-substring-no-properties start end)))
+ (if (not (equal start end))
+ (buffer-substring-no-properties start end)
+ (save-excursion
+ (let ((line (thing-at-point 'line t)))
+ (when (string-match-p (regexp-quote "}") line)
+ (beginning-of-line))
+ (when (string-match-p (regexp-quote "{") line)
+ (end-of-line))
+ (graphql-current-query))))))
(defun graphql-current-operation ()
"Return the name of the current graphql query."
- [nongnu] elpa/graphql-mode 5971b69c8c 076/122: Fix: respect local value of graphql-url when posting a request, (continued)
- [nongnu] elpa/graphql-mode 5971b69c8c 076/122: Fix: respect local value of graphql-url when posting a request, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 5e7665dfc4 059/122: forget the actual changes, (I have two location to dev/test), ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 2326c1fb18 034/122: Merge pull request #7 from eoma/fix-url, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 04e56ae626 053/122: Disable json-mode for response temporarily, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ab58192967 081/122: Merge pull request #23 from leoliu/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode c643d53a4b 083/122: Don't send operationName when operation is an empty string, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 09a9af6c98 075/122: Merge remote-tracking branch 'origin/master' into next, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode b802f77542 068/122: graphql-send-query: Silence byte-compiler, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4aebf7afd9 066/122: graphql-post-request: Use URL instead of missing ENDPOINT, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 7c37aee28b 096/122: Open .gql files automatically as well, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 1125c2136d 055/122: extend graphql-current-operation to support 'line' boundary if sexp fail,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode 321c1f4b64 095/122: Implement support for loading graphql-configs, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 033f6a074c 082/122: Don't use temp buffer, as it breaks local variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 63cd55ed7d 099/122: Implement abort behaviour, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 7088db7250 091/122: Merge pull request #29 from Prillan/enable-json-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 9bed568ec8 097/122: Add Homepage header, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4147fbfd97 109/122: Refuse to open g-e-h unless in graphql-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 562d13fc20 101/122: Factor out buffer closing code, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode af9b235e14 103/122: Add content of graphql-extra-headers to buffer, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 3581ad03e0 094/122: Allow *GraphQL* response buffer to be closed with "q" key, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 22361631a1 111/122: Add documentation, ELPA Syncer, 2022/01/29