(eww-update-field display))))
(defun eww-update-field (string &optional offset)
- (if (not offset) (setq offset 0))
+ (unless offset
+ (setq offset 0))
(let ((properties (text-properties-at (point)))
(start (+ (eww-beginning-of-field) offset))
(current-end (1+ (eww-end-of-field)))
- (new-end (1+ (+ (eww-beginning-of-field) (length string)))))
+ (new-end (+ (eww-beginning-of-field) (length string)))
+ (inhibit-read-only t))
(delete-region start current-end)
(forward-char offset)
(insert string
(make-string (- (- (+ new-end offset) start) (length string)) ? ))
- (if (= 0 offset) (set-text-properties start new-end properties))
+ (when (= 0 offset)
+ (set-text-properties start new-end properties))
start))
(defun eww-toggle-checkbox ()