@item cursor-face
@kindex cursor-face @r{(text property)}
-This property is similar to @code{mouse-face} but the face is used the
-cursor (instead of mouse) is on or near the character. Near has the
-same meaning than in @code{mouse-face} and the highlight only takes
-effect if the mode @code{cursor-face-highlight-mode} is enabled;
-otherwise no highlight is performed.
+This property is similar to @code{mouse-face} but the face is used if
+the cursor (instead of mouse) is on or near the character. Near has
+the same meaning than in @code{mouse-face} and the highlight only
+takes effect if the mode @code{cursor-face-highlight-mode} is enabled;
+otherwise no highlight is performed. When the variable
+@code{cursor-face-highlight-nonselected-window} is non-@code{nil} the
+text is highlighted even if the window is not selected similar to
+@code{highlight-nonselected-windows} for the region. The default
+value is the same of @code{cursor-in-non-selected-windows}.
@item fontified
@kindex fontified @r{(text property)}
+++
** New 'cursor-face 'text' property.
This uses cursor-face instead of the default face when cursor is on or
-near the character and 'cursor-face-highlight-mode' is enabled.
+near the character and 'cursor-face-highlight-mode' is enabled. The
+variable 'highlight-nonselected-windows' is similar to
+'highlight-nonselected-windows' but for this property.
+++
** New event type 'touch-end'.
(unless (equal new rol)
(set-window-parameter window 'internal-region-overlay new))))))
+(defcustom cursor-face-highlight-nonselected-window cursor-in-non-selected-windows
+ "Non-nil means highlight text with `cursor-face' even in nonselected windows.
+This variable is similar to `highlight-nonselected-windows'."
+ :local t
+ :type 'boolean
+ :version "29.1")
+
(defun redisplay--update-cursor-face-highlight (window)
"Highlights the overlay used to highlight text with cursor-face."
(let ((rol (window-parameter window 'internal-cursor-face-overlay)))
- (if-let (((or (eq window (selected-window))
+ (if-let (((or cursor-face-highlight-nonselected-window
+ (eq window (selected-window))
(and (window-minibuffer-p)
(eq window (minibuffer-selected-window)))))
(pt (window-point window))