File tree 2 files changed +15
-12
lines changed
2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ * fix json string being insert to curretn buffer when running ` lsp-dart-run ` . #224
4
+
3
5
## 1.24.3
4
6
5
7
* Add ` lsp-dart-dap-tools-args ` to configure custom args for DAP process.
Original file line number Diff line number Diff line change 47
47
&key method params &allow-other-keys)
48
48
" Implement send method to format JSON properly.
49
49
CONN ARGS METHOD PARAMS"
50
- (when method
51
- (plist-put args :method
52
- (cond ((keywordp method) (substring (symbol-name method) 1 ))
53
- ((and method (symbolp method)) (symbol-name method))
54
- ((stringp method) method))))
55
- (unless params
56
- (cl-remf args :params ))
57
- (let ((json (concat " [" (jsonrpc--json-encode args) " ]\r\n " )))
58
- (jsonrpc--log-event conn args 'client )
59
- (process-send-string
60
- (jsonrpc--process conn)
61
- json)))
50
+ (with-temp-buffer
51
+ (when method
52
+ (plist-put args :method
53
+ (cond ((keywordp method) (substring (symbol-name method) 1 ))
54
+ ((and method (symbolp method)) (symbol-name method))
55
+ ((stringp method) method))))
56
+ (unless params
57
+ (cl-remf args :params ))
58
+ (let ((json (concat " [" (jsonrpc--json-encode args) " ]\r\n " )))
59
+ (jsonrpc--log-event conn args 'client )
60
+ (process-send-string
61
+ (jsonrpc--process conn)
62
+ json))))
62
63
63
64
(cl-defmethod initialize-instance :after ((conn lsp-dart-flutter-daemon-connection) _slots)
64
65
" CONN."
You can’t perform that action at this time.
0 commit comments