Commit cff37e7
committed
fix: auto-adopt the only candidate instead of popping a single-option picker
When there's exactly one tunnel to resume, inquire still rendered the
prompt with a forced '>' marker on the lone row and arrow keys were
no-ops. The terminal cursor sat on the '? Resume which tunnel?' line —
visually it looked like the selector hadn't moved 'to the correct line'
because there was no other line to move to. The picker only earns its
keep when there's a choice to make.
Short-circuit at one candidate: print 'Resuming the only tunnel ...'
naming the hostname and id, return it directly. The >1 case still pops
the picker, where arrow-key movement was verified working under pty
with cursor-position+selected-index alignment.1 parent c39d9ee commit cff37e7
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
990 | 1006 | | |
991 | 1007 | | |
992 | 1008 | | |
| |||
0 commit comments