comparison src/window.c @ 15713:ad8b2c109b22 v8.1.0864

patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff' commit https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 31 18:26:10 2019 +0100 patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff' Problem: Cannot have a local value for 'scrolloff' and 'sidescrolloff'. (Gary Holloway) Solution: Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by Aron Widforss, closes #3539)
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Jan 2019 18:30:08 +0100
parents 6f1c7e9a6393
children 77e97f159554
comparison
equal deleted inserted replaced
15712:bc1989f9bd37 15713:ad8b2c109b22
4592 #endif 4592 #endif
4593 new_wp->w_botline = 2; 4593 new_wp->w_botline = 2;
4594 new_wp->w_cursor.lnum = 1; 4594 new_wp->w_cursor.lnum = 1;
4595 new_wp->w_scbind_pos = 1; 4595 new_wp->w_scbind_pos = 1;
4596 4596
4597 // use global option value for global-local options
4598 new_wp->w_p_so = -1;
4599 new_wp->w_p_siso = -1;
4600
4597 /* We won't calculate w_fraction until resizing the window */ 4601 /* We won't calculate w_fraction until resizing the window */
4598 new_wp->w_fraction = 0; 4602 new_wp->w_fraction = 0;
4599 new_wp->w_prev_fraction_row = -1; 4603 new_wp->w_prev_fraction_row = -1;
4600 4604
4601 #ifdef FEAT_GUI 4605 #ifdef FEAT_GUI
5869 } 5873 }
5870 } 5874 }
5871 5875
5872 if (wp == curwin) 5876 if (wp == curwin)
5873 { 5877 {
5874 if (p_so) 5878 if (get_scrolloff_value())
5875 update_topline(); 5879 update_topline();
5876 curs_columns(FALSE); /* validate w_wrow */ 5880 curs_columns(FALSE); /* validate w_wrow */
5877 } 5881 }
5878 if (prev_height > 0) 5882 if (prev_height > 0)
5879 wp->w_prev_fraction_row = wp->w_wrow; 5883 wp->w_prev_fraction_row = wp->w_wrow;