comparison src/ex_docmd.c @ 34639:ceee63c7f7aa v9.1.0205

patch 9.1.0205: Cannot use modifiers before :-Ntabmove Commit: https://github.com/vim/vim/commit/076faac5378cf517baa8c331c57488d39efadec0 Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Mar 25 16:41:06 2024 +0100 patch 9.1.0205: Cannot use modifiers before :-Ntabmove Problem: Cannot use modifiers before :-Ntabmove. Solution: Check backwards from the command instead of checking from the start of the command line. Slightly adjust docs to make them more consistent (zeertzjq). closes: #14289 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 25 Mar 2024 16:45:06 +0100
parents dd8f5311cee5
children 6b2efa2b2386
comparison
equal deleted inserted replaced
34638:857eb73fb6a7 34639:ceee63c7f7aa
6315 tab_number = 0; 6315 tab_number = 0;
6316 } 6316 }
6317 else 6317 else
6318 { 6318 {
6319 tab_number = eap->line2; 6319 tab_number = eap->line2;
6320 if (!unaccept_arg0 && *skipwhite(*eap->cmdlinep) == '-') 6320 if (!unaccept_arg0)
6321 { 6321 {
6322 --tab_number; 6322 char_u *cmdp = eap->cmd;
6323 if (tab_number < unaccept_arg0) 6323
6324 eap->errmsg = _(e_invalid_range); 6324 while (--cmdp > *eap->cmdlinep
6325 && (VIM_ISWHITE(*cmdp) || VIM_ISDIGIT(*cmdp)))
6326 ;
6327 if (*cmdp == '-')
6328 {
6329 --tab_number;
6330 if (tab_number < unaccept_arg0)
6331 eap->errmsg = _(e_invalid_range);
6332 }
6325 } 6333 }
6326 } 6334 }
6327 } 6335 }
6328 else 6336 else
6329 { 6337 {