um-mode : restrict movement to bolp with cursor-intangible-mode

This commit is contained in:
bth 2026-06-06 13:37:14 -07:00
commit e6abab09a9

12
um.el
View file

@ -455,7 +455,15 @@ Optional TAGS string may contain more than one tag separated by a comma.
\\{um-mode-map}
"
(read-only-mode)
)
;; restrict movement to (bolp) with cursor-intangible-mode
(save-excursion
(goto-char (point-min))
(while (not (eobp))
;; NOTE: actually the newline is the only position not included, but this
;; positions the cursor visually at the bol:
(put-text-property (pos-bol) (pos-eol) 'cursor-intangible t)
(forward-line 1)))
(cursor-intangible-mode)
(read-only-mode))
(provide 'um)