summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-12-09 22:06:19 +0200
committerEli Zaretskii <eliz@gnu.org>2017-12-09 22:06:19 +0200
commit122e7264b88049e8d1a0b54dd993f137238c33fb (patch)
tree9db4446dd341a4401c524d1b6790814254adf3f5 /src/xfns.c
parente1cc2037a9183bab9440b7b981a233c95d896aac (diff)
downloademacs-122e7264b88049e8d1a0b54dd993f137238c33fb.tar.gz
Fix tool-tip display when display margins are non-zero by default
* src/buffer.h (bset_left_margin_cols, bset_right_margin_cols): New inline functions. * src/xfns.c (Fx_show_tip): * src/w32fns.c (Fx_show_tip): Force display margins of the tip buffer to zero, as it will be displayed in a pseudo-window, which doesn't support display margins. (Bug#29627)
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c
index bbe73aa7c28..044f14876e3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6623,6 +6623,7 @@ Text larger than the specified size is clipped. */)
ptrdiff_t count = SPECPDL_INDEX ();
ptrdiff_t count_1;
Lisp_Object window, size;
+ Lisp_Object tip_buf;
AUTO_STRING (tip, " *tip*");
specbind (Qinhibit_redisplay, Qt);
@@ -6787,7 +6788,12 @@ Text larger than the specified size is clipped. */)
tip_f = XFRAME (tip_frame);
window = FRAME_ROOT_WINDOW (tip_f);
- set_window_buffer (window, Fget_buffer_create (tip), false, false);
+ tip_buf = Fget_buffer_create (tip);
+ /* We will mark the tip window a "pseudo-window" below, and such
+ windows cannot have display margins. */
+ bset_left_margin_cols (XBUFFER (tip_buf), make_number (0));
+ bset_right_margin_cols (XBUFFER (tip_buf), make_number (0));
+ set_window_buffer (window, tip_buf, false, false);
w = XWINDOW (window);
w->pseudo_window_p = true;