Commit 6b6874b
authored
Display command description in doc dialog on tab completion (#1180)
* Refactor show_doc_dialog_proc into smaller methods
* Display command description in doc dialog on tab completion
* Consolidate full-screen doc display into display_document
The open_doc paths in dialog content methods duplicated logic already
in display_document. Now the dialog lambda calls display_document
directly for Alt+d, and the content methods only handle inline dialog
rendering.
* Preserve whitespace alignment in wrap_lines
Split on /(\s+)/ instead of /\s+/ so multi-space gaps in help text
(e.g. option alignment) are preserved when wrapping lines.1 parent 209bcf7 commit 6b6874b
6 files changed
Lines changed: 309 additions & 115 deletions
File tree
- lib/irb
- command
- test/irb
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
45 | 80 | | |
46 | 81 | | |
47 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
11 | 34 | | |
12 | 35 | | |
13 | 36 | | |
| |||
76 | 99 | | |
77 | 100 | | |
78 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
79 | 108 | | |
80 | 109 | | |
81 | 110 | | |
| |||
118 | 147 | | |
119 | 148 | | |
120 | 149 | | |
121 | | - | |
122 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
123 | 154 | | |
124 | 155 | | |
125 | 156 | | |
| |||
201 | 232 | | |
202 | 233 | | |
203 | 234 | | |
204 | | - | |
205 | | - | |
| 235 | + | |
| 236 | + | |
206 | 237 | | |
207 | 238 | | |
208 | 239 | | |
| |||
0 commit comments