fix: cursor movement marks dirty in text-input and textarea (regression from cursor rendering fix)

This commit is contained in:
Hermes Agent
2026-05-12 14:07:17 +00:00
parent b0ede26bff
commit baa27f766f
2 changed files with 14 additions and 7 deletions

View File

@@ -72,17 +72,21 @@
;;; ---------------------------------------------------------------------------
(defun text-input-move-left (input)
(when (plusp (text-input-cursor input))
(decf (text-input-cursor input))))
(decf (text-input-cursor input)))
(mark-dirty input))
(defun text-input-move-right (input)
(when (< (text-input-cursor input) (length (text-input-value input)))
(incf (text-input-cursor input))))
(incf (text-input-cursor input)))
(mark-dirty input))
(defun text-input-move-home (input)
(setf (text-input-cursor input) 0))
(setf (text-input-cursor input) 0)
(mark-dirty input))
(defun text-input-move-end (input)
(setf (text-input-cursor input) (length (text-input-value input))))
(setf (text-input-cursor input) (length (text-input-value input)))
(mark-dirty input))
(defun text-input-delete-word-before (input)
"Delete from cursor back to previous word boundary."