xref-edit--prepare-buffer: Fix text insertion behavior around prefix

* lisp/progmodes/xref.el (xref-edit--prepare-buffer): Fix text
insertion behavior before and after the line-number prefix.
This commit is contained in:
Dmitry Gutov
2026-04-01 04:33:37 +03:00
parent f55df442d3
commit 1e807c5376

View File

@@ -1490,7 +1490,12 @@ between them by typing in the minibuffer with completion."
(match-end 0)))))
(when line-number-end
(add-text-properties (prop-match-beginning match) line-number-end
'(read-only t occur-prefix t))))))))
'( read-only t
occur-prefix t
;; Allow insertion of text right
;; after prefix, but not before.
front-sticky t
rear-nonsticky t))))))))
(defvar xref-edit-mode-map
(let ((map (make-sparse-keymap)))