Validate user text object desc more thorougly
Fixes #992 Fixes #993 Fixes #994
This commit is contained in:
parent
430ff37bd6
commit
9ad1c19f69
|
@ -1011,7 +1011,7 @@ void select_object(Context& context, NormalParams params)
|
|||
return;
|
||||
|
||||
Vector<String> params = split(cmdline, ',', '\\');
|
||||
if (params.size() != 2)
|
||||
if (params.size() != 2 or params[0].empty() or params[1].empty())
|
||||
throw runtime_error{"desc parsing failed, expected <open>,<close>"};
|
||||
|
||||
select_and_set_last<mode>(
|
||||
|
|
1
test/regression/993-user-text-object/cmd
Normal file
1
test/regression/993-user-text-object/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
<a-a>:,,<ret>
|
1
test/regression/993-user-text-object/in
Normal file
1
test/regression/993-user-text-object/in
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/regression/993-user-text-object/out
Normal file
1
test/regression/993-user-text-object/out
Normal file
|
@ -0,0 +1 @@
|
|||
|
Loading…
Reference in New Issue
Block a user