From 2ec2a88f6344198616d6d3aaeda9cd6738e7b74b Mon Sep 17 00:00:00 2001 From: Daniel Pettersson Date: Tue, 10 Dec 2024 11:35:49 +0100 Subject: [PATCH] Restore line and column in repl on region update --- dape.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dape.el b/dape.el index cd2be54..f5a7f13 100644 --- a/dape.el +++ b/dape.el @@ -4513,13 +4513,15 @@ If REPL buffer is not live STRING will be displayed in minibuffer." (end (save-excursion (next-single-property-change (point) 'dape--revert-tag)))) - (let ((line (line-number-at-pos (point) t))) + (let ((line (line-number-at-pos (point) t)) + (col (current-column))) (delete-region start end) (insert (funcall fn)) (dape--repl-move-marker (1+ (point))) (ignore-errors (goto-char (point-min)) - (forward-line (1- line)))))) + (forward-line (1- line)) + (forward-char col))))) (defun dape--repl-variable (variable) "Return VARIABLE string representation with CONN."