When I want to Format just some amount of selected lines in Visual mode, I get the following
error:
Error detected while processing function 715..991..985..982..981..929..971..913:
line 4:
E716: Key not present in Dictionary: pattern,'^(\%#=\d)\?','\1\C',"")})
E116: Invalid arguments for function substitute(v:val.pattern,'^(\%#=\d)\?','\1\C',"")})
E116: Invalid arguments for function extend(v:val, {"pattern": substitute(v:val.pattern,'^(\%#=\d)\?','\1\C',"")})
Error detected while processing function 715..991..985:
line 4:
E171: Missing :endif
The situation that this happens is specific, and I know how to avoid the error.
It happens only when the cursor is not positioned past the end of the selection area.
For example, in the following C file:
int main() { }
If I select the two lines in Visual mode using line-selection (shift-v), but keep the cursor
at } and do :‘<,’>Format format, the error shows up, if I put the cursor after }, it executes
without problems.
This is the echo for getmatches() put just above the offending formatvim line:
Anonymous
Closed from https://sourceforge.net/p/formatvim/code/ci/7075086701b68c8dc4d28fd7c16c8a8c5ec009c5/.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Thanks!