#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;
}