| 2430 | FIXME: Should we generally be counting non printable chars? */ |
| 2431 | |
| 2432 | static size_t |
| 2433 | debug_width (char const *text, char const *lim) |
| 2434 | { |
| 2435 | size_t width = mbsnwidth (text, lim - text, 0); |
| 2436 | while (text < lim) |
| 2437 | width += (*text++ == '\t'); |
| 2438 | return width; |
| 2439 | } |
| 2440 | |
| 2441 | /* For debug mode, "underline" a key at the |
| 2442 | specified offset and screen width. */ |