fix a regression in the previous commit for tab complete
1e8c5b68
Reported by Santtu Lakkala <inz@inz.fi>, thanks!
1 file(s) · +1 −1
Reported by Santtu Lakkala <inz@inz.fi>, thanks!
| 519 | 519 | return; |
|
| 520 | 520 | cursor = strnlen(sel->text, sizeof text - 1); |
|
| 521 | 521 | memcpy(text, sel->text, cursor); |
|
| 522 | - | text[sizeof text - 1] = '\0'; |
|
| 522 | + | text[cursor] = '\0'; |
|
| 523 | 523 | match(); |
|
| 524 | 524 | break; |
|
| 525 | 525 | } |