From: Gerd Moellmann Date: Fri, 27 Jul 2001 15:29:54 +0000 (+0000) Subject: (init_from_display_pos): If POS is in an overlay string, X-Git-Tag: emacs-pretest-21.0.105~366 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75c5350ac7163c9789e8c21fc7427fce9e1c642d;p=emacs.git (init_from_display_pos): If POS is in an overlay string, deal with the first overlay string having an image `display' property. (try_window_reusing_current_matrix, compute_line_metrics): Fix computation of row's visible height for the case that part of the row is invisible above and part of the row is at the same time invisible below the window. --- diff --git a/etc/NEWS b/etc/NEWS index e0e8d8a20c2..99d5ac3da0d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1150,8 +1150,8 @@ the first 12 members of a list and at most 4 nesting levels deep (if the list is longer or deeper than that, an ellipsis `...' is printed). - or on the printed text replace the abbreviated printed -representation with an unabbreviated one. + or on the printed text toggles between an abbreviated +printed representation and an unabbreviated one. The default value of eval-expression-debug-on-error is t, so any error during evaluation produces a backtrace. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4de616fddcb..fa6a5fa69ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2001-07-27 Gerd Moellmann + * emacs-lisp/lisp-mode.el (last-sexp-setup-props): New function. + (last-sexp-toggle-display): Renamed from last-sexp-print. + (last-sexp-toggle-display, eval-last-sexp-1): Use + last-sexp-setup-props. + * mwheel.el (mouse-wheel-down-button, mouse-wheel-up-button): New user-options. (mouse-wheel-change-button): New function. diff --git a/src/ChangeLog b/src/ChangeLog index 19915ea7bda..0f3276fd72e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2001-07-27 Gerd Moellmann + + * xterm.c (x_get_glyph_string_clip_rect): Minor cleanup. + + * dispnew.c (shift_glyph_matrix, blank_row): Fix computation + of row's visible height. + + * xdisp.c (init_from_display_pos): If POS is in an overlay string, + deal with the first overlay string having an image `display' + property. + (try_window_reusing_current_matrix, compute_line_metrics): Fix + computation of row's visible height for the case that part of the + row is invisible above and part of the row is at the same time + invisible below the window. + 2001-07-26 Gerd Moellmann * xfns.c (x-show-tip): Doc fix. diff --git a/src/xdisp.c b/src/xdisp.c index 6b382906f58..fae6aa5d440 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1835,11 +1835,18 @@ init_from_display_pos (it, w, pos) after-string. */ init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID); - /* If position is within an overlay string, set up IT to - the right overlay string. */ + /* If position is within an overlay string, set up IT to the right + overlay string. */ if (pos->overlay_string_index >= 0) { int relative_index; + + /* If the first overlay string happens to have a `display' + property for an image, the iterator will be set up for that + image, and we have to undo that setup first before we can + correct the overlay string index. */ + if (it->method == next_element_from_image) + pop_it (it); /* We already have the first chunk of overlay strings in IT->overlay_strings. Load more until the one for @@ -10481,7 +10488,7 @@ try_window_reusing_current_matrix (w) struct glyph_row *last_reused_text_row; struct glyph_row *start_row; int start_vpos, min_y, max_y; - + if (/* This function doesn't handle terminal frames. */ !FRAME_WINDOW_P (f) /* Don't try to reuse the display if windows have been split @@ -10623,14 +10630,12 @@ try_window_reusing_current_matrix (w) ++row) { row->y = it.current_y; + row->visible_height = row->height; if (row->y < min_y) - row->visible_height = row->height - (min_y - row->y); - else if (row->y + row->height > max_y) - row->visible_height - = row->height - (row->y + row->height - max_y); - else - row->visible_height = row->height; + row->visible_height -= min_y - row->y; + if (row->y + row->height > max_y) + row->visible_height -= row->y + row->height - max_y; it.current_y += row->height; @@ -10785,13 +10790,11 @@ try_window_reusing_current_matrix (w) for (row = first_reusable_row; row < first_row_to_display; ++row) { row->y -= dy; + row->visible_height = row->height; if (row->y < min_y) - row->visible_height = row->height - (min_y - row->y); - else if (row->y + row->height > max_y) - row->visible_height - = row->height - (row->y + row->height - max_y); - else - row->visible_height = row->height; + row->visible_height -= min_y - row->y; + if (row->y + row->height > max_y) + row->visible_height -= row->y + row->height - max_y; } /* Scroll the current matrix. */ @@ -12246,7 +12249,7 @@ compute_line_metrics (it) if (FRAME_WINDOW_P (it->f)) { - int i, header_line_height; + int i, min_y, max_y; /* The line may consist of one space only, that was added to place the cursor on it. If so, the row's height hasn't been @@ -12285,15 +12288,13 @@ compute_line_metrics (it) /* Compute how much of the line is visible. */ row->visible_height = row->height; - header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (it->w); - if (row->y < header_line_height) - row->visible_height -= header_line_height - row->y; - else - { - int max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w); - if (row->y + row->height > max_y) - row->visible_height -= row->y + row->height - max_y; - } + min_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (it->w); + max_y = WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE (it->w); + + if (row->y < min_y) + row->visible_height -= min_y - row->y; + if (row->y + row->height > max_y) + row->visible_height -= row->y + row->height - max_y; } else {