[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about display engine

From: Ergus
Subject: Question about display engine
Date: Wed, 7 Aug 2019 02:54:11 +0200
User-agent: NeoMutt/20180716


Sorry to bother with this.

Fixing the issue 36858 in text mode I found that the
extend_face_to_end_of_line uses the same face for the last char in the

This is useful to extend selection face the whole line, but this created
a difference with gui emacs when the last face was underlined or
overlined because in tui the underline is extended for the entire line.

To fix this I need to create a new face to extend until the end of the
line that has the same properties than it->face_id except that the
underline and overline properties will be disabled.

I can produce the desired effect doing:

(defface my_new_face
 '((t :weight normal :slant normal
      :underline nil :overline nil :strike-through nil
      :box nil :inverse-video nil :stipple nil)))

DEFSYM (my_new_face, "my-new-face");

it->face_id = merge_faces (it->w, my-new-face, 0, it->face_id)

But this seems very dirty.

How can I produce the same effect in the right way? (I mean create a new
face_id based on it->face_id but with :underline nil :overline
nil... etc?) And only with C code.

Any help, suggestion?
Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]