Mercurial > emacs
changeset 16256:1ce0cb94fa68
(preserve_other_columns, preserve_my_columns): Use new
macros WINDOW_LEFT_MARGIN and WINDOW_RIGHT_EDGE.
(adjust_window_charstarts, verify_charstarts, cancel_my_columns):
Use new macro WINDOW_LEFT_MARGIN instead of w->left.
(direct_output_for_insert, direct_output_forward_char): Likewise.
(buffer_posn_from_coords): Likewise.
(verify_charstarts): Use new macro WINDOW_FULL_WIDTH_P.
(update_frame): For determining when to wrap the cursor, use the
new macro FRAME_WINDOW_WIDTH instead of FRAME_WIDTH; they aren't
necessarily the same any more.
(change_frame_size_1): Use FRAME_WINDOW_WIDTH to check for changes.
Give `set_window_width' the window width value. Use new macro SET_FRAME_WIDTH.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Sep 1996 01:21:18 +0000 |
parents | dcde843403a3 |
children | 3cc73a430181 |
files | src/dispnew.c |
diffstat | 1 files changed, 23 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dispnew.c Sat Sep 21 01:16:33 1996 +0000 +++ b/src/dispnew.c Sat Sep 21 01:21:18 1996 +0000 @@ -823,8 +823,8 @@ register int vpos; register struct frame_glyphs *current_frame, *desired_frame; register FRAME_PTR frame = XFRAME (w->frame); - int start = XFASTINT (w->left); - int end = XFASTINT (w->left) + XFASTINT (w->width); + int start = WINDOW_LEFT_MARGIN (w); + int end = WINDOW_RIGHT_EDGE (w); int bot = XFASTINT (w->top) + XFASTINT (w->height); current_frame = FRAME_CURRENT_GLYPHS (frame); @@ -886,8 +886,8 @@ register int vpos, fin; register struct frame_glyphs *l1, *l2; register FRAME_PTR frame = XFRAME (w->frame); - int start = XFASTINT (w->left); - int end = XFASTINT (w->left) + XFASTINT (w->width); + int start = WINDOW_LEFT_MARGIN (w); + int end = WINDOW_RIGHT_EDGE (w); int bot = XFASTINT (w->top) + XFASTINT (w->height); for (vpos = XFASTINT (w->top); vpos < bot; vpos++) @@ -920,7 +920,7 @@ int vpos; int adjust; { - int left = XFASTINT (w->left); + int left = WINDOW_LEFT_MARGIN (w); int top = XFASTINT (w->top); int right = left + window_internal_width (w); int bottom = top + window_internal_height (w); @@ -948,12 +948,12 @@ int i; int top = XFASTINT (w->top); int bottom = top + window_internal_height (w); - int left = XFASTINT (w->left); + int left = WINDOW_LEFT_MARGIN (w); int right = left + window_internal_width (w); int next_line; int truncate = (XINT (w->hscroll) || (truncate_partial_width_windows - && (XFASTINT (w->width) < FRAME_WIDTH (f))) + && !WINDOW_FULL_WIDTH_P (w)) || !NILP (XBUFFER (w->buffer)->truncate_lines)); for (i = top; i < bottom; i++) @@ -1003,7 +1003,7 @@ register int vpos; register struct frame_glyphs *desired_glyphs = FRAME_DESIRED_GLYPHS (XFRAME (w->frame)); - register int start = XFASTINT (w->left); + register int start = WINDOW_LEFT_MARGIN (w); register int bot = XFASTINT (w->top) + XFASTINT (w->height); for (vpos = XFASTINT (w->top); vpos < bot; vpos++) @@ -1042,10 +1042,10 @@ int vpos = FRAME_CURSOR_Y (frame); /* Give up if about to continue line. */ - if (hpos >= XFASTINT (w->left) + window_internal_width (w) - 1 + if (hpos >= WINDOW_LEFT_MARGIN (w) + window_internal_width (w) - 1 /* Avoid losing if cursor is in invisible text off left margin */ - || (XINT (w->hscroll) && hpos == XFASTINT (w->left)) + || (XINT (w->hscroll) && hpos == WINDOW_LEFT_MARGIN (w)) /* Give up if cursor outside window (in minibuf, probably) */ || cursor_in_echo_area @@ -1117,12 +1117,12 @@ int hpos = FRAME_CURSOR_X (frame); /* Give up if in truncated text at end of line. */ - if (hpos >= XFASTINT (w->left) + window_internal_width (w) - 1) + if (hpos >= WINDOW_LEFT_MARGIN (w) + window_internal_width (w) - 1) return 0; /* Avoid losing if cursor is in invisible text off left margin or about to go off either side of window. */ - if ((FRAME_CURSOR_X (frame) == XFASTINT (w->left) + if ((FRAME_CURSOR_X (frame) == WINDOW_LEFT_MARGIN (w) && (XINT (w->hscroll) || n < 0)) || (n > 0 && (FRAME_CURSOR_X (frame) + 1 >= window_internal_width (w) - 1)) @@ -1342,8 +1342,9 @@ cursor_to (row, col); } else - cursor_to (FRAME_CURSOR_Y (f), max (min (FRAME_CURSOR_X (f), - FRAME_WIDTH (f) - 1), 0)); + cursor_to (FRAME_CURSOR_Y (f), + max (min (FRAME_CURSOR_X (f), + FRAME_WINDOW_WIDTH (f) - 1), 0)); } update_end (f); @@ -1467,7 +1468,7 @@ int col, line; { int hscroll = XINT (window->hscroll); - int window_left = XFASTINT (window->left); + int window_left = WINDOW_LEFT_MARGIN (window); /* The actual width of the window is window->width less one for the DISP_CONTINUE_GLYPH, and less one if it's not the rightmost @@ -2083,6 +2084,7 @@ register FRAME_PTR frame; int newheight, newwidth, pretend, delay; { + int new_frame_window_width; /* If we can't deal with the change now, queue it for later. */ if (delay) { @@ -2101,13 +2103,14 @@ newheight = FRAME_HEIGHT (frame); if (newwidth == 0) newwidth = FRAME_WIDTH (frame); + new_frame_window_width = FRAME_WINDOW_WIDTH_ARG (frame, newwidth); /* Round up to the smallest acceptable size. */ check_frame_size (frame, &newheight, &newwidth); /* If we're not changing the frame size, quit now. */ if (newheight == FRAME_HEIGHT (frame) - && newwidth == FRAME_WIDTH (frame)) + && new_frame_window_width == FRAME_WINDOW_WIDTH (frame)) return; BLOCK_INPUT; @@ -2149,11 +2152,11 @@ #endif } - if (newwidth != FRAME_WIDTH (frame)) + if (new_frame_window_width != FRAME_WINDOW_WIDTH (frame)) { - set_window_width (FRAME_ROOT_WINDOW (frame), newwidth, 0); + set_window_width (FRAME_ROOT_WINDOW (frame), new_frame_window_width, 0); if (FRAME_HAS_MINIBUF_P (frame)) - set_window_width (FRAME_MINIBUF_WINDOW (frame), newwidth, 0); + set_window_width (FRAME_MINIBUF_WINDOW (frame), new_frame_window_width, 0); if (FRAME_TERMCAP_P (frame) && !pretend) FrameCols = newwidth; @@ -2168,7 +2171,7 @@ } FRAME_HEIGHT (frame) = newheight; - FRAME_WIDTH (frame) = newwidth; + SET_FRAME_WIDTH (frame, newwidth); if (FRAME_CURSOR_X (frame) >= FRAME_WIDTH (frame)) FRAME_CURSOR_X (frame) = FRAME_WIDTH (frame) - 1;