diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-03-09 14:50:33 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-03-09 14:50:33 +0000 |
commit | a1b0a6dbe8fb397dc867ce72f93699d8fd0514fe (patch) | |
tree | 0c4a511b22f587341b19effffe52aa9b5af8c34d /src/dispnew.c | |
parent | e0d9aa62ba6959c1289ecbf15717b88e4fa0ede5 (diff) | |
download | emacs-a1b0a6dbe8fb397dc867ce72f93699d8fd0514fe.tar.gz |
(buffer_posn_from_coords): Add parameters OBJECT and
POS; return void.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 755c20be494..977a3f9530b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5685,14 +5685,17 @@ update_frame_line (f, vpos) X/Y Position -> Buffer Position ***********************************************************************/ -/* Return the character position of the character at window relative - pixel position (*X, *Y). *X and *Y are adjusted to character - boundaries. */ +/* Determine what's under window-relative pixel position (*X, *Y). + Return in *OBJECT the object (string or buffer) that's there. + Return in *POS the position in that object. Adjust *X and *Y + to character boundaries. */ -int -buffer_posn_from_coords (w, x, y) +void +buffer_posn_from_coords (w, x, y, object, pos) struct window *w; int *x, *y; + Lisp_Object *object; + struct display_pos *pos; { struct it it; struct buffer *old_current_buffer = current_buffer; @@ -5712,7 +5715,9 @@ buffer_posn_from_coords (w, x, y) *x = it.current_x - it.first_visible_x + left_area_width; *y = it.current_y; current_buffer = old_current_buffer; - return IT_CHARPOS (it); + + *object = STRINGP (it.string) ? it.string : w->buffer; + *pos = it.current; } |