mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 03:38:53 +00:00
Check for exact match for layout name before looking for a prefix match.
This commit is contained in:
parent
4860a58d07
commit
6e9a914014
@ -55,6 +55,10 @@ layout_set_lookup(const char *name)
|
||||
u_int i;
|
||||
int matched = -1;
|
||||
|
||||
for (i = 0; i < nitems(layout_sets); i++) {
|
||||
if (strcmp(layout_sets[i].name, name) == 0)
|
||||
return (i);
|
||||
}
|
||||
for (i = 0; i < nitems(layout_sets); i++) {
|
||||
if (strncmp(layout_sets[i].name, name, strlen(name)) == 0) {
|
||||
if (matched != -1) /* ambiguous */
|
||||
|
Loading…
Reference in New Issue
Block a user