|
36 | 36 | " "
|
37 | 37 | "")
|
38 | 38 | label (or (. opts.substitute_chars target.label) target.label)
|
39 |
| - text (.. label pad) |
40 | 39 | relative-group (- target.group (or ?group-offset 0))
|
41 |
| - virttext |
42 |
| - (if (= relative-group 1) [[text hl.group.label-primary]] |
43 |
| - (= relative-group 2) [[text hl.group.label-secondary]] |
44 |
| - (> relative-group 2) |
45 |
| - (when (and ?phase (not opts.highlight_unlabeled_phase_one_targets)) |
46 |
| - ; In this case, "no highlight" should unambiguously signal |
47 |
| - ; "no further keystrokes needed", so it is mandatory to |
48 |
| - ; show all labeled positions in some way. (Note: We're |
49 |
| - ; keeping this on even after phase one - sudden visual |
50 |
| - ; changes should be avoided as much as possible.) |
51 |
| - [[(.. opts.concealed_label pad) hl.group.label-secondary]]))] |
| 40 | + virttext (if (= relative-group 1) |
| 41 | + [[(.. label pad) hl.group.label-primary]] |
| 42 | + |
| 43 | + (= relative-group 2) |
| 44 | + [[(if ?phase (.. label pad) (.. opts.concealed_label pad)) |
| 45 | + hl.group.label-secondary]] |
| 46 | + |
| 47 | + (> relative-group 2) |
| 48 | + (when (and ?phase (not opts.highlight_unlabeled_phase_one_targets)) |
| 49 | + ; In this case, "no highlight" should unambiguously |
| 50 | + ; signal "no further keystrokes needed", so it is |
| 51 | + ; mandatory to show all labeled positions in some way. |
| 52 | + ; (Note: We're keeping this on even after phase one - |
| 53 | + ; sudden visual changes should be avoided as much as |
| 54 | + ; possible.) |
| 55 | + [[(.. opts.concealed_label pad) hl.group.label-secondary]]))] |
52 | 56 | ; Set nil too (= switching off a beacon).
|
53 | 57 | (set target.beacon (when virttext [offset virttext]))))
|
54 | 58 |
|
|
0 commit comments