aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJuri Linkov2019-10-01 23:01:08 +0300
committerJuri Linkov2019-10-01 23:01:08 +0300
commit3f981a0a89bca47a207fb362485f07e7322bb145 (patch)
tree95001fa93b9693684108dd114da2a0232640e32e /src/window.c
parent457a7edb4784869079eac2a47d2dc1738332c07a (diff)
downloademacs-feature/tabs.tar.gz
emacs-feature/tabs.zip
Remove unused code and reformat to 70 columns.feature/tabs
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c
index 6749ffde4c1..1d0716eb776 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1321,7 +1321,8 @@ coordinates_in_window (register struct window *w, int x, int y)
1321 && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) 1321 && y < top_y + CURRENT_TAB_LINE_HEIGHT (w)
1322 && (part = ON_TAB_LINE)) 1322 && (part = ON_TAB_LINE))
1323 || (window_wants_header_line (w) 1323 || (window_wants_header_line (w)
1324 && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) + CURRENT_HEADER_LINE_HEIGHT (w) 1324 && y < top_y + CURRENT_TAB_LINE_HEIGHT (w)
1325 + CURRENT_HEADER_LINE_HEIGHT (w)
1325 && (part = ON_HEADER_LINE))) 1326 && (part = ON_HEADER_LINE)))
1326 { 1327 {
1327 /* If it's under/over the scroll bar portion of the mode/header 1328 /* If it's under/over the scroll bar portion of the mode/header
@@ -5808,8 +5809,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
5808 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 5809 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
5809 if (IT_CHARPOS (it) == PT 5810 if (IT_CHARPOS (it) == PT
5810 && it.current_y >= this_scroll_margin 5811 && it.current_y >= this_scroll_margin
5811 && it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w) 5812 && it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w)
5812 && (NILP (Vscroll_preserve_screen_position) 5813 - WINDOW_HEADER_LINE_HEIGHT (w)
5814 && (NILP (Vscroll_preserve_screen_position)
5813 || EQ (Vscroll_preserve_screen_position, Qt))) 5815 || EQ (Vscroll_preserve_screen_position, Qt)))
5814 /* We found PT at a legitimate height. Leave it alone. */ 5816 /* We found PT at a legitimate height. Leave it alone. */
5815 ; 5817 ;
@@ -5824,7 +5826,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
5824 is necessary because we set it.current_y to 0, above. */ 5826 is necessary because we set it.current_y to 0, above. */
5825 move_it_to (&it, -1, 5827 move_it_to (&it, -1,
5826 window_scroll_pixel_based_preserve_x, 5828 window_scroll_pixel_based_preserve_x,
5827 goal_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w), 5829 goal_y - WINDOW_TAB_LINE_HEIGHT (w)
5830 - WINDOW_HEADER_LINE_HEIGHT (w),
5828 -1, MOVE_TO_Y | MOVE_TO_X); 5831 -1, MOVE_TO_Y | MOVE_TO_X);
5829 } 5832 }
5830 5833
@@ -5860,8 +5863,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
5860 /* We subtract WINDOW_HEADER_LINE_HEIGHT because 5863 /* We subtract WINDOW_HEADER_LINE_HEIGHT because
5861 it.y is relative to the bottom of the header 5864 it.y is relative to the bottom of the header
5862 line, see above. */ 5865 line, see above. */
5863 (it.last_visible_y - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w) 5866 (it.last_visible_y - WINDOW_TAB_LINE_HEIGHT (w)
5864 - partial_line_height (&it) - this_scroll_margin - 1), 5867 - WINDOW_HEADER_LINE_HEIGHT (w)
5868 - partial_line_height (&it) - this_scroll_margin - 1),
5865 -1, 5869 -1,
5866 MOVE_TO_POS | MOVE_TO_Y); 5870 MOVE_TO_POS | MOVE_TO_Y);
5867 5871
@@ -5899,13 +5903,15 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
5899 if (it.what == IT_EOB) 5903 if (it.what == IT_EOB)
5900 partial_p = 5904 partial_p =
5901 it.current_y + it.ascent + it.descent 5905 it.current_y + it.ascent + it.descent
5902 > it.last_visible_y - this_scroll_margin - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); 5906 > it.last_visible_y - this_scroll_margin
5907 - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w);
5903 else 5908 else
5904 { 5909 {
5905 move_it_by_lines (&it, 1); 5910 move_it_by_lines (&it, 1);
5906 partial_p = 5911 partial_p =
5907 it.current_y 5912 it.current_y
5908 > it.last_visible_y - this_scroll_margin - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); 5913 > it.last_visible_y - this_scroll_margin
5914 - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w);
5909 } 5915 }
5910 5916
5911 if (charpos == PT && !partial_p 5917 if (charpos == PT && !partial_p