aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2017-06-27 19:46:50 +0300
committerEli Zaretskii2017-06-27 19:46:50 +0300
commit71e31ac839b05d01486d728d4da9a8daaf1ae240 (patch)
treecf14db6eaec2f0c60cde894a053368676bbc85df /src
parentbeb95a8f890da611acc1a4422211deafe512d87d (diff)
downloademacs-71e31ac839b05d01486d728d4da9a8daaf1ae240.tar.gz
emacs-71e31ac839b05d01486d728d4da9a8daaf1ae240.zip
Support default-text-properties
* src/xdisp.c (should_produce_line_number): Call get-char-property at ZV as well, to support default-text-properties.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c18
1 files changed, 10 insertions, 8 deletions
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)
21000#endif 21000#endif
21001 21001
21002 /* If the character at current position has a non-nil special 21002 /* If the character at current position has a non-nil special
21003 property, disable line numbers for this row. For ZV, we need to 21003 property, disable line numbers for this row. This is for
21004 use a special algorithm that only supports empty overlays at that 21004 packages such as company-mode, which need this for their tricky
21005 point, because get-char-property always returns nil for ZV. */ 21005 layout, where line numbers get in the way. */
21006 Lisp_Object val; 21006 Lisp_Object val = Fget_char_property (make_number (IT_CHARPOS (*it)),
21007 if (IT_CHARPOS (*it) >= ZV) 21007 Qdisplay_line_numbers_disable,
21008 it->window);
21009 /* For ZV, we need to also look in empty overlays at that point,
21010 because get-char-property always returns nil for ZV, except if
21011 the property is in 'default-text-properties'. */
21012 if (NILP (val) && IT_CHARPOS (*it) >= ZV)
21008 val = disable_line_numbers_overlay_at_eob (); 21013 val = disable_line_numbers_overlay_at_eob ();
21009 else
21010 val = Fget_char_property (make_number (IT_CHARPOS (*it)),
21011 Qdisplay_line_numbers_disable, it->window);
21012 return NILP (val) ? true : false; 21014 return NILP (val) ? true : false;
21013} 21015}
21014 21016