Commit e13d237
committed
Touch Bar add submenu/title/emoji picker support
Can now specify submenus. E.g. TouchBar.Debugger.Run. When trying to
create a submenu it will first create a popover item and then only
create the NSButton at the leaf.
- Unfortunatley macOS currently can't do multiple levels of submenus (the
API will allow it, but it doesn't really work), presumably for
usability concerns. Limit it to only one level of nesting for now.
Add ability to set a title on a Touch Bar button, using `tmenu`. This
allows us to override the displayed button name, and when an icon is
specified the override name will still be shown alongside the icon.
Add emoji picker support, and add it to the list of default Touch Bar
menus. Only enable it in modes where the user is typing (insert,
command, terminal, etc).
Fixed up the internal implementation of Touch Bar management so it's
easier to add metadata to it now.
Also, add documentation.
TODO:
- Using `tmenu` after `amenu` doesn't really work (unless it's specified
in vimrc). This is because MacVim hasn't implemented
`gui_mch_menu_set_tip`. Should fix it by adding support for it. For
now, the user can just call `tmenu` before `amenu`.
- Disabling menus currently just hides the menu. Since the user can
already do `aunmenu` to hide, should change the disable behavior to
show the button but disabled instead, similar to how toolbars and
normal menus work.1 parent a9f6bac commit e13d237
7 files changed
Lines changed: 298 additions & 80 deletions
File tree
- runtime
- doc
- src/MacVim
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
519 | 520 | | |
520 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
521 | 528 | | |
522 | 529 | | |
523 | 530 | | |
| |||
530 | 537 | | |
531 | 538 | | |
532 | 539 | | |
| 540 | + | |
533 | 541 | | |
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
537 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
538 | 560 | | |
539 | 561 | | |
540 | 562 | | |
541 | 563 | | |
542 | | - | |
| 564 | + | |
543 | 565 | | |
544 | 566 | | |
545 | | - | |
| 567 | + | |
546 | 568 | | |
547 | 569 | | |
548 | | - | |
549 | | - | |
| 570 | + | |
| 571 | + | |
550 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
551 | 579 | | |
552 | 580 | | |
553 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6801 | 6801 | | |
6802 | 6802 | | |
6803 | 6803 | | |
| 6804 | + | |
6804 | 6805 | | |
6805 | 6806 | | |
6806 | 6807 | | |
| |||
7803 | 7804 | | |
7804 | 7805 | | |
7805 | 7806 | | |
| 7807 | + | |
7806 | 7808 | | |
| 7809 | + | |
7807 | 7810 | | |
| 7811 | + | |
| 7812 | + | |
| 7813 | + | |
7808 | 7814 | | |
7809 | 7815 | | |
7810 | 7816 | | |
| |||
8618 | 8624 | | |
8619 | 8625 | | |
8620 | 8626 | | |
| 8627 | + | |
8621 | 8628 | | |
8622 | 8629 | | |
8623 | 8630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
1336 | | - | |
| 1335 | + | |
| 1336 | + | |
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
| |||
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
1345 | | - | |
1346 | | - | |
| 1345 | + | |
| 1346 | + | |
1347 | 1347 | | |
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | | - | |
1354 | | - | |
| 1353 | + | |
| 1354 | + | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
| |||
1360 | 1360 | | |
1361 | 1361 | | |
1362 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1363 | 1371 | | |
1364 | 1372 | | |
1365 | 1373 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 38 | + | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
0 commit comments