]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix sending input to SQL when point is not at EOB
authorEli Zaretskii <eliz@gnu.org>
Thu, 18 Apr 2024 08:53:26 +0000 (11:53 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:05:17 +0000 (14:05 +0300)
* lisp/progmodes/sql.el (sql-send-string): Move point to EOB
before sending input to the SQL process.  Suggested by Gary Hollis
<ghollisjr@gmail.com>.  (Bug#69420)

(cherry picked from commit bb9d81d5144ae497809c416eef91d126f8ac5df5)

lisp/progmodes/sql.el

index 604f04a3d5703fa6d44fd53eec4a398cdf1dace5..5273ba2bee1633b827896f04f0a4eafd6d5d6e2d 100644 (file)
@@ -3721,6 +3721,8 @@ prompts (`sql-output-newline-count' is positive).  In this case:
          (save-excursion
            ;; Set product context
            (with-current-buffer sql-buffer
+              ;; Make sure point is at EOB before sending input to SQL.
+              (goto-char (point-max))
               (when sql-debug-send
                 (message ">>SQL> %S" s))
               (insert "\n")