# HG changeset patch # User Bram Moolenaar # Date 1648396804 -7200 # Node ID 73c5dbdc4236d3437e21c4281d9e1477eeecb949 # Parent 1b6553ab16e5021ce301f2bbfffa087a7579c692 patch 8.2.4636: not using Visual range Commit: https://github.com/vim/vim/commit/1501b63f8dedbd15ee5bfd9a177e558ffdf0673a Author: Bram Moolenaar Date: Sun Mar 27 16:56:21 2022 +0100 patch 8.2.4636: not using Visual range Problem: Not using Visual range. Solution: Put the command pointer back to the range. diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3092,15 +3092,21 @@ parse_command_modifiers( break; } - if (has_visual_range && eap->cmd > cmd_start) - { - // Move the '<,'> range to after the modifiers and insert a colon. - // Since the modifiers have been parsed put the colon on top of the - // space: "'<,'>mod cmd" -> "mod:'<,'>cmd - // Put eap->cmd after the colon. - mch_memmove(cmd_start - 5, cmd_start, eap->cmd - cmd_start); - eap->cmd -= 5; - mch_memmove(eap->cmd - 1, ":'<,'>", 6); + if (has_visual_range) + { + if (eap->cmd > cmd_start) + { + // Move the '<,'> range to after the modifiers and insert a colon. + // Since the modifiers have been parsed put the colon on top of the + // space: "'<,'>mod cmd" -> "mod:'<,'>cmd + // Put eap->cmd after the colon. + mch_memmove(cmd_start - 5, cmd_start, eap->cmd - cmd_start); + eap->cmd -= 5; + mch_memmove(eap->cmd - 1, ":'<,'>", 6); + } + else + // no modifiers, move the pointer back + eap->cmd -= 5; } return OK; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4636, +/**/ 4635, /**/ 4634,