diff options
| author | Eli Zaretskii | 2012-03-31 21:10:34 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-03-31 21:10:34 +0300 |
| commit | a6b1c7ccc3a017f44e6671b13281ce7f3e32e2af (patch) | |
| tree | a036358b000578788d259598df329ae61112cf80 /src/window.c | |
| parent | 697ba24bbf1bafb9677038037aeefdd97bc33b71 (diff) | |
| download | emacs-a6b1c7ccc3a017f44e6671b13281ce7f3e32e2af.tar.gz emacs-a6b1c7ccc3a017f44e6671b13281ce7f3e32e2af.zip | |
Fix bug #7464 with mouse highlight after "C-x 1".
src/window.c (Fdelete_other_windows_internal): Invalidate the row
and column information about mouse highlight, so that redisplay
restores it after reallocating the glyph matrices.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index bcbf0ad2bde..af7968f9edf 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2565,6 +2565,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2565 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; | 2565 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2566 | EMACS_INT startpos IF_LINT (= 0); | 2566 | EMACS_INT startpos IF_LINT (= 0); |
| 2567 | int top IF_LINT (= 0), new_top, resize_failed; | 2567 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2568 | Mouse_HLInfo *hlinfo; | ||
| 2568 | 2569 | ||
| 2569 | w = decode_any_window (window); | 2570 | w = decode_any_window (window); |
| 2570 | XSETWINDOW (window, w); | 2571 | XSETWINDOW (window, w); |
| @@ -2645,6 +2646,20 @@ window-start value is reasonable when this function is called. */) | |||
| 2645 | } | 2646 | } |
| 2646 | 2647 | ||
| 2647 | BLOCK_INPUT; | 2648 | BLOCK_INPUT; |
| 2649 | hlinfo = MOUSE_HL_INFO (f); | ||
| 2650 | /* We are going to free the glyph matrices of WINDOW, and with that | ||
| 2651 | we might lose any information about glyph rows that have some of | ||
| 2652 | their glyphs highlighted in mouse face. (These rows are marked | ||
| 2653 | with a non-zero mouse_face_p flag.) If WINDOW indeed has some | ||
| 2654 | glyphs highlighted in mouse face, signal to frame's up-to-date | ||
| 2655 | hook that mouse highlight was overwritten, so that it will | ||
| 2656 | arrange for redisplaying the highlight. */ | ||
| 2657 | if (EQ (hlinfo->mouse_face_window, window)) | ||
| 2658 | { | ||
| 2659 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 2660 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 2661 | hlinfo->mouse_face_window = Qnil; | ||
| 2662 | } | ||
| 2648 | free_window_matrices (r); | 2663 | free_window_matrices (r); |
| 2649 | 2664 | ||
| 2650 | windows_or_buffers_changed++; | 2665 | windows_or_buffers_changed++; |