From: Eli Zaretskii Date: Tue, 27 Jun 2017 16:46:50 +0000 (+0300) Subject: Support default-text-properties X-Git-Tag: emacs-26.0.90~518^2~156^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71e31ac839b05d01486d728d4da9a8daaf1ae240;p=emacs.git Support default-text-properties * src/xdisp.c (should_produce_line_number): Call get-char-property at ZV as well, to support default-text-properties. --- diff --git a/src/xdisp.c b/src/xdisp.c index 67266fdf315..ef2e2646b2c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21000,15 +21000,17 @@ should_produce_line_number (struct it *it) #endif /* If the character at current position has a non-nil special - property, disable line numbers for this row. For ZV, we need to - use a special algorithm that only supports empty overlays at that - point, because get-char-property always returns nil for ZV. */ - Lisp_Object val; - if (IT_CHARPOS (*it) >= ZV) + property, disable line numbers for this row. This is for + packages such as company-mode, which need this for their tricky + layout, where line numbers get in the way. */ + Lisp_Object val = Fget_char_property (make_number (IT_CHARPOS (*it)), + Qdisplay_line_numbers_disable, + it->window); + /* For ZV, we need to also look in empty overlays at that point, + because get-char-property always returns nil for ZV, except if + the property is in 'default-text-properties'. */ + if (NILP (val) && IT_CHARPOS (*it) >= ZV) val = disable_line_numbers_overlay_at_eob (); - else - val = Fget_char_property (make_number (IT_CHARPOS (*it)), - Qdisplay_line_numbers_disable, it->window); return NILP (val) ? true : false; }