[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs' headband helpful tips sliced by window edge
From: |
Aloof Petrofsky |
Subject: |
Re: emacs' headband helpful tips sliced by window edge |
Date: |
20 Dec 2001 13:58:41 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
The current behavior is that a tooltip that fits to the right of the
mouse cursor is displayed to the right, otherwise the tip is displayed
to the left. I think this is rightly called a bug for two reasons:
1. It causes truncation even if the tip could fit on the screen (if
the cursor is in the middle of the screen, any tip greater than
half a screen-width gets truncated).
2. Whenever it truncates, it lops off the beginning of the tip
rather than the end.
The patch below fixes both problems: if a tip does not fit to either
side of the cursor, it is placed flush to the left of the screen.
-al
--- xfns.c 2001/12/20 21:26:46 1.1
+++ xfns.c 2001/12/20 21:29:16
@@ -10878,10 +10878,12 @@
if (INTEGERP (left))
*root_x = XINT (left);
- else if (*root_x + XINT (dx) + width > FRAME_X_DISPLAY_INFO (f)->width)
+ else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
+ *root_x += XINT (dx);
+ else if (width + XINT (dx) <= *root_x)
*root_x -= width + XINT (dx);
else
- *root_x += XINT (dx);
+ *root_x = 0;
}
Re: "Feelings": Me and emacs 21 for the 21st century, Kevin Rodgers, 2001/12/19