From 03d1a1896654b1014db6e7da740b660cb6d81cc0 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 15 Mar 2001 16:29:17 +0000 Subject: [PATCH] (fast_find_position): Return the correct vpos. --- src/ChangeLog | 2 ++ src/xterm.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 835c9a5d490..dfcfaa8dde2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Gerd Moellmann + * xterm.c (fast_find_position): Return the correct vpos. + * data.c (store_symval_forwarding): Add parameter BUF. If BUF is non-null, set a per-buffer value in BUF instead of the current buffer. diff --git a/src/xterm.c b/src/xterm.c index 7652bbb0453..20c1fda2193 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7248,11 +7248,13 @@ fast_find_position (w, pos, hpos, vpos, x, y) int maybe_next_line_p = 0; int line_start_position; int yb = window_text_bottom_y (w); - struct glyph_row *row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); - struct glyph_row *best_row = row; - int row_vpos = 0, best_row_vpos = 0; + struct glyph_row *row, *best_row; + int row_vpos, best_row_vpos; int current_x; + row = best_row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + row_vpos = best_row_vpos = MATRIX_ROW_VPOS (row, w->current_matrix); + while (row->y < yb) { if (row->used[TEXT_AREA]) -- 2.39.2