To: vim_dev@googlegroups.com Subject: Patch 8.2.4845 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4845 Problem: Duplicate code. Solution: Move code below if/else. (closes #10314) Files: src/misc1.c *** ../vim-8.2.4844/src/misc1.c 2022-04-17 14:18:07.364733158 +0100 --- src/misc1.c 2022-04-29 11:28:03.836207243 +0100 *************** *** 673,683 **** { buf[i++] = 'R'; buf[i++] = 'v'; - - if (ins_compl_active()) - buf[i++] = 'c'; - else if (ctrl_x_mode_not_defined_yet()) - buf[i++] = 'x'; } else { --- 673,678 ---- *************** *** 685,696 **** buf[i++] = 'R'; else buf[i++] = 'i'; - - if (ins_compl_active()) - buf[i++] = 'c'; - else if (ctrl_x_mode_not_defined_yet()) - buf[i++] = 'x'; } } else if ((State & CMDLINE) || exmode_active) { --- 680,691 ---- buf[i++] = 'R'; else buf[i++] = 'i'; } + + if (ins_compl_active()) + buf[i++] = 'c'; + else if (ctrl_x_mode_not_defined_yet()) + buf[i++] = 'x'; } else if ((State & CMDLINE) || exmode_active) { *** ../vim-8.2.4844/src/version.c 2022-04-29 11:06:30.746054573 +0100 --- src/version.c 2022-04-29 11:29:12.160269896 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4845, /**/ -- From "know your smileys": :-H Is missing teeth /// 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 ///