comparison src/optionstr.c @ 25487:c26ff3203b43 v8.2.3280

patch 8.2.3280: 'virtualedit' local to buffer is not the best solution Commit: https://github.com/vim/vim/commit/51ad850f5fbafa7aa3f60affa74ec9c9f992c6cc Author: Gary Johnson <garyjohn@spocom.com> Date: Tue Aug 3 18:33:08 2021 +0200 patch 8.2.3280: 'virtualedit' local to buffer is not the best solution Problem: 'virtualedit' local to buffer is not the best solution. Solution: Make it window-local. (Gary Johnson, closes https://github.com/vim/vim/issues/8685)
author Bram Moolenaar <Bram@vim.org>
date Tue, 03 Aug 2021 18:45:04 +0200
parents ac88cd21ae88
children 4b2616ffe32b
comparison
equal deleted inserted replaced
25486:9ca6ec7da094 25487:c26ff3203b43
296 check_string_option(&buf->b_p_menc); 296 check_string_option(&buf->b_p_menc);
297 #ifdef FEAT_VARTABS 297 #ifdef FEAT_VARTABS
298 check_string_option(&buf->b_p_vsts); 298 check_string_option(&buf->b_p_vsts);
299 check_string_option(&buf->b_p_vts); 299 check_string_option(&buf->b_p_vts);
300 #endif 300 #endif
301 check_string_option(&buf->b_p_ve);
302 } 301 }
303 302
304 /* 303 /*
305 * Free the string allocated for an option. 304 * Free the string allocated for an option.
306 * Checks for the string being empty_option. This may happen if we're out of 305 * Checks for the string being empty_option. This may happen if we're out of
2081 char_u *ve = p_ve; 2080 char_u *ve = p_ve;
2082 unsigned int *flags = &ve_flags; 2081 unsigned int *flags = &ve_flags;
2083 2082
2084 if (opt_flags & OPT_LOCAL) 2083 if (opt_flags & OPT_LOCAL)
2085 { 2084 {
2086 ve = curbuf->b_p_ve; 2085 ve = curwin->w_p_ve;
2087 flags = &curbuf->b_ve_flags; 2086 flags = &curwin->w_ve_flags;
2088 } 2087 }
2089 2088
2090 if ((opt_flags & OPT_LOCAL) && *ve == NUL) 2089 if ((opt_flags & OPT_LOCAL) && *ve == NUL)
2091 // make the local value empty: use the global value 2090 // make the local value empty: use the global value
2092 *flags = 0; 2091 *flags = 0;