diff options
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/mactoolbox.c | 12 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cd2263fa43c..dd1c35f3578 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-08-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macterm.c (x_load_font): Round average width to the nearest integer. | ||
| 4 | |||
| 5 | * mactoolbox.c [USE_MAC_TSM] (mac_handle_text_input_event): | ||
| 6 | Check if display is up to date before accessing current matrix. | ||
| 7 | |||
| 1 | 2008-08-15 Chong Yidong <cyd@stupidchicken.com> | 8 | 2008-08-15 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * process.c (make_process): Initialize kill_without_query struct | 10 | * process.c (make_process): Initialize kill_without_query struct |
diff --git a/src/mactoolbox.c b/src/mactoolbox.c index f470c517554..58d975742e6 100644 --- a/src/mactoolbox.c +++ b/src/mactoolbox.c | |||
| @@ -570,6 +570,7 @@ mac_handle_text_input_event (next_handler, event, data) | |||
| 570 | #ifndef MAC_OSX | 570 | #ifndef MAC_OSX |
| 571 | break; | 571 | break; |
| 572 | #else /* MAC_OSX */ | 572 | #else /* MAC_OSX */ |
| 573 | struct buffer *b; | ||
| 573 | CFRange sel_range; | 574 | CFRange sel_range; |
| 574 | int charpos; | 575 | int charpos; |
| 575 | int hpos, vpos, x, y; | 576 | int hpos, vpos, x, y; |
| @@ -579,8 +580,17 @@ mac_handle_text_input_event (next_handler, event, data) | |||
| 579 | 580 | ||
| 580 | f = mac_focus_frame (&one_mac_display_info); | 581 | f = mac_focus_frame (&one_mac_display_info); |
| 581 | w = XWINDOW (f->selected_window); | 582 | w = XWINDOW (f->selected_window); |
| 583 | b = XBUFFER (w->buffer); | ||
| 584 | |||
| 585 | /* Are we in a window whose display is up to date? | ||
| 586 | And verify the buffer's text has not changed. */ | ||
| 587 | if (!(EQ (w->window_end_valid, w->buffer) | ||
| 588 | && XINT (w->last_modified) == BUF_MODIFF (b) | ||
| 589 | && XINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))) | ||
| 590 | break; | ||
| 591 | |||
| 582 | mac_get_selected_range (w, &sel_range); | 592 | mac_get_selected_range (w, &sel_range); |
| 583 | charpos = (BUF_BEGV (XBUFFER (w->buffer)) + sel_range.location | 593 | charpos = (BUF_BEGV (b) + sel_range.location |
| 584 | + byte_offset / (long) sizeof (UniChar)); | 594 | + byte_offset / (long) sizeof (UniChar)); |
| 585 | 595 | ||
| 586 | if (!fast_find_position (w, charpos, &hpos, &vpos, &x, &y, Qnil)) | 596 | if (!fast_find_position (w, charpos, &hpos, &vpos, &x, &y, Qnil)) |