We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be81dd7 + 5af927d commit ad5e510Copy full SHA for ad5e510
chatgpt-shell.el
@@ -3179,11 +3179,12 @@ Of the form
3179
(line-beginning-position)))
3180
(end (region-end)))
3181
;; Barf trailing space from selection.
3182
- (when (string-match "[ \n\t]+$"
3183
- (buffer-substring-no-properties
3184
- start
3185
- end))
3186
- (setq end (- end (length (match-string 0)))))
+ (let ((text (buffer-substring-no-properties
+ start
+ end)))
+ (when (string-match "[ \n\t]+$"
+ text)
3187
+ (setq end (- end (length (match-string 0 text))))))
3188
(list (cons :start start)
3189
(cons :end end)
3190
(cons :buffer (current-buffer))
0 commit comments