(string :tag "Stock/named")))))
:group 'x)
+(defcustom x-display-cursor-at-start-of-preedit-string nil
+ "If non-nil, display the cursor at the start of any pre-edit text."
+ :version "29.1"
+ :type 'boolean
+ :group 'x)
+
(defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal))
(defun x-gtk-map-stock (file)
(delete-overlay x-preedit-overlay)
(setq x-preedit-overlay nil))
(when (nth 1 event)
- (setq x-preedit-overlay (make-overlay (point) (point)))
- (overlay-put x-preedit-overlay 'window (selected-window))
- (overlay-put x-preedit-overlay 'before-string
- (propertize (nth 1 event) 'face '(:underline t)))))
+ (let ((string (propertize (nth 1 event) 'face '(:underline t))))
+ (setq x-preedit-overlay (make-overlay (point) (point)))
+ (overlay-put x-preedit-overlay 'window (selected-window))
+ (overlay-put x-preedit-overlay 'before-string
+ (if x-display-cursor-at-start-of-preedit-string
+ (propertize string 'cursor t)
+ string)))))
(define-key special-event-map [preedit-text] 'x-preedit-text)