aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1997-11-15 20:24:41 +0000
committerKarl Heuer1997-11-15 20:24:41 +0000
commit409bb864e5689c17281282d319075bbf7ae75f60 (patch)
treed8454c916a4a775292c5c3a8d25182ef73bfc039 /src
parent7614f779e06b6c24f313afce77d19851ece1af92 (diff)
downloademacs-409bb864e5689c17281282d319075bbf7ae75f60.tar.gz
emacs-409bb864e5689c17281282d319075bbf7ae75f60.zip
(display_text_line): Make decision about which windows
highlight the region in just once place. When minibuffer is selected, show the region in the previous window,
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 933cff33848..9a20830e1d3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2895,11 +2895,10 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done)
2895 && !WINDOW_FULL_WIDTH_P (w)) 2895 && !WINDOW_FULL_WIDTH_P (w))
2896 || !NILP (current_buffer->truncate_lines)); 2896 || !NILP (current_buffer->truncate_lines));
2897 2897
2898 /* 1 if we should highlight the region. */ 2898 /* 1 if this buffer has a region to highlight. */
2899 int highlight_region 2899 int highlight_region
2900 = (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active) 2900 = (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active)
2901 && (XWINDOW (current_buffer->last_selected_window) == w 2901 && XMARKER (current_buffer->mark)->buffer != 0);
2902 || highlight_nonselected_windows));
2903 int region_beg, region_end; 2902 int region_beg, region_end;
2904 2903
2905 int selective = (INTEGERP (current_buffer->selective_display) 2904 int selective = (INTEGERP (current_buffer->selective_display)
@@ -2959,10 +2958,12 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done)
2959 if (tab_width <= 0 || tab_width > 1000) tab_width = 8; 2958 if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
2960 2959
2961 /* Show where to highlight the region. */ 2960 /* Show where to highlight the region. */
2962 if (highlight_region && XMARKER (current_buffer->mark)->buffer != 0 2961 if (highlight_region
2963 /* Maybe highlight only in selected window. */ 2962 /* Maybe highlight only in selected window. */
2964 && (highlight_nonselected_windows 2963 && (highlight_nonselected_windows
2965 || w == XWINDOW (selected_window))) 2964 || w == XWINDOW (selected_window)
2965 || (MINI_WINDOW_P (XWINDOW (selected_window))
2966 && w == XWINDOW (Vminibuf_scroll_window))))
2966 { 2967 {
2967 region_beg = marker_position (current_buffer->mark); 2968 region_beg = marker_position (current_buffer->mark);
2968 if (PT < region_beg) 2969 if (PT < region_beg)