To: vim_dev@googlegroups.com Subject: Patch 9.0.1526 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1526 Problem: Condition is always true. Solution: Remove unnecessary condition. (closes #12359) Files: src/screen.c *** ../vim-9.0.1525/src/screen.c 2023-04-17 16:40:54.724586083 +0100 --- src/screen.c 2023-05-08 15:54:57.253864679 +0100 *************** *** 4658,4670 **** /* * Handle setting 'listchars' or 'fillchars'. * "value" points to either the global or the window-local value. ! * "opt_lcs" is TRUE for "listchars" and FALSE for "fillchars". * When "apply" is FALSE do not store the flags, only check for errors. * Assume monocell characters. * Returns error message, NULL if it's OK. */ static char * ! set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply) { int round, i, len, len2, entries; char_u *p, *s; --- 4658,4670 ---- /* * Handle setting 'listchars' or 'fillchars'. * "value" points to either the global or the window-local value. ! * "is_listchars" is TRUE for "listchars" and FALSE for "fillchars". * When "apply" is FALSE do not store the flags, only check for errors. * Assume monocell characters. * Returns error message, NULL if it's OK. */ static char * ! set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply) { int round, i, len, len2, entries; char_u *p, *s; *************** *** 4673,4679 **** char_u *last_lmultispace = NULL; // Last occurrence of "leadmultispace:" int multispace_len = 0; // Length of lcs-multispace string int lead_multispace_len = 0; // Length of lcs-leadmultispace string - int is_listchars = opt_lcs; struct charstab { --- 4673,4678 ---- *************** *** 4720,4733 **** tab = lcstab; CLEAR_FIELD(lcs_chars); entries = ARRAY_LENGTH(lcstab); ! if (opt_lcs && wp->w_p_lcs[0] == NUL) value = p_lcs; // local value is empty, use the global value } else { tab = filltab; entries = ARRAY_LENGTH(filltab); ! if (!opt_lcs && wp->w_p_fcs[0] == NUL) value = p_fcs; // local value is empty, us the global value } --- 4719,4732 ---- tab = lcstab; CLEAR_FIELD(lcs_chars); entries = ARRAY_LENGTH(lcstab); ! if (wp->w_p_lcs[0] == NUL) value = p_lcs; // local value is empty, use the global value } else { tab = filltab; entries = ARRAY_LENGTH(filltab); ! if (wp->w_p_fcs[0] == NUL) value = p_fcs; // local value is empty, us the global value } *** ../vim-9.0.1525/src/version.c 2023-05-08 15:50:49.194261284 +0100 --- src/version.c 2023-05-08 15:55:38.925807495 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1526, /**/ -- hundred-and-one symptoms of being an internet addict: 19. All of your friends have an @ in their names. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///