Mercurial > emacs
comparison src/xdisp.c @ 16069:8fe5e69de92a
(redisplay_internal): Test last_selected_window slot.
(mark_window_display_accurate, display_text_line): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 02 Sep 1996 05:19:13 +0000 |
parents | ccf489f8596e |
children | 0c87a74b1650 |
comparison
equal
deleted
inserted
replaced
16068:b19129a8c644 | 16069:8fe5e69de92a |
---|---|
1021 } | 1021 } |
1022 /* If highlighting the region, or if the cursor is in the echo area, | 1022 /* If highlighting the region, or if the cursor is in the echo area, |
1023 then we can't just move the cursor. */ | 1023 then we can't just move the cursor. */ |
1024 else if (! (!NILP (Vtransient_mark_mode) | 1024 else if (! (!NILP (Vtransient_mark_mode) |
1025 && !NILP (current_buffer->mark_active)) | 1025 && !NILP (current_buffer->mark_active)) |
1026 && w == XWINDOW (current_buffer->last_selected_window) | |
1026 && NILP (w->region_showing) | 1027 && NILP (w->region_showing) |
1027 && !cursor_in_echo_area) | 1028 && !cursor_in_echo_area) |
1028 { | 1029 { |
1029 pos = *compute_motion (tlbufpos, 0, | 1030 pos = *compute_motion (tlbufpos, 0, |
1030 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0, | 1031 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0, |
1277 ? Qt : Qnil); | 1278 ? Qt : Qnil); |
1278 | 1279 |
1279 /* Record if we are showing a region, so can make sure to | 1280 /* Record if we are showing a region, so can make sure to |
1280 update it fully at next redisplay. */ | 1281 update it fully at next redisplay. */ |
1281 w->region_showing = (!NILP (Vtransient_mark_mode) | 1282 w->region_showing = (!NILP (Vtransient_mark_mode) |
1283 && w == XWINDOW (current_buffer->last_selected_window) | |
1282 && !NILP (XBUFFER (w->buffer)->mark_active) | 1284 && !NILP (XBUFFER (w->buffer)->mark_active) |
1283 ? Fmarker_position (XBUFFER (w->buffer)->mark) | 1285 ? Fmarker_position (XBUFFER (w->buffer)->mark) |
1284 : Qnil); | 1286 : Qnil); |
1285 } | 1287 } |
1286 | 1288 |
2555 && XFASTINT (w->width) < FRAME_WIDTH (f)) | 2557 && XFASTINT (w->width) < FRAME_WIDTH (f)) |
2556 || !NILP (current_buffer->truncate_lines)); | 2558 || !NILP (current_buffer->truncate_lines)); |
2557 | 2559 |
2558 /* 1 if we should highlight the region. */ | 2560 /* 1 if we should highlight the region. */ |
2559 int highlight_region | 2561 int highlight_region |
2560 = !NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active); | 2562 = (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active) |
2563 && XWINDOW (current_buffer->last_selected_window) == w); | |
2561 int region_beg, region_end; | 2564 int region_beg, region_end; |
2562 | 2565 |
2563 int selective = (INTEGERP (current_buffer->selective_display) | 2566 int selective = (INTEGERP (current_buffer->selective_display) |
2564 ? XINT (current_buffer->selective_display) | 2567 ? XINT (current_buffer->selective_display) |
2565 : !NILP (current_buffer->selective_display) ? -1 : 0); | 2568 : !NILP (current_buffer->selective_display) ? -1 : 0); |