Commit Graph

157 Commits

Author SHA1 Message Date
Yee Cheng Chin
0b58aa150f Add terminal menu mappings for new tab/tab next/full screen menus
Vim terminals use tlmenu to specify menu items and the normal `amenu`
doesn't work. This causes functionality such as toggling full screen and
going to next/prev tab to not work in terminal mode. Fix that by adding
the proper tlmenu mapping to the appropriate items.

Fix #1045
2020-08-11 22:05:23 -07:00
ichizok
4d306060eb Merge remote-tracking branch 'vim/master' 2020-06-19 14:17:00 +09:00
Bram Moolenaar
65e0d77a66 Update runtime files 2020-06-14 17:29:55 +02:00
Yee Cheng Chin
f0d844930f Merge remote-tracking branch 'vim/master' 2020-03-29 16:35:29 -07:00
Bram Moolenaar
5908fdf72f patch 8.2.0478: new buffers are not added to the Buffers menu
Problem:    New buffers are not added to the Buffers menu.
Solution:   Turn number into string. (Yee Cheng Chin, closes #5864)
2020-03-29 20:08:45 +02:00
Yee Cheng Chin
6054e34ef9 Merge remote-tracking branch 'vim/master' 2020-03-29 05:09:53 -07:00
Bram Moolenaar
5e94a29ebb patch 8.2.0413: buffer menu does not handle special buffers properly
Problem:    Buffer menu does not handle special buffers properly.
Solution:   Keep a dictionary with buffer names to reliably keep track of
            entries.
            Also trigger BufFilePre and BufFilePost for command-line and
            terminal buffers when the name changes.
2020-03-19 18:46:57 +01:00
Yee Cheng Chin
409780536e Fixing buffer menu having stale items with terminal / cmdline window
Currently, when using special buffers like terminals / command-line
window / quickfix / location list, these buffers will get added to the
"Buffers" menu, but they don't get removed when the buffers are gone,
leaving stale menu items. Fix buffer menu to be more robust.

1. Currently the buffer menu works by using the buffer name to
   add/remove the entries, but it's error-prone because the buffer could
   have been renamed under-the-hood. While it uses BufFilePre/Post
   autocommands to handle normal buffer renames, it doesn't work for the
   command-line window (accessible via `q:`) which gets renamed without
   sending the autocommand. Instead, change the menus to cached a
   dictionary a bufnum -> menu name, so it will always know how to
   remove a buffer from itself.
2. Add BufFilePre/Post autocommands to command-line windows when it
   changes the buffer name to "[Command Line]".
3. Add BufFilePre/Post autocommands to terminal windows when it
   changes the buffer name to the command, e.g. "!/bin/zsh".

Either (1) or (2)+(3) will fix the issue, but just doing all of them as
this seems like the right thing to do (2 + 3) also means the menu items
show the correct names instead of just saying "[No Name]".

This doesn't fix the following which needs to be fixed later:
1. Quickfix and Location List don't send BufDeleted autocmds. This leads
   to them also leaving stale buffer menu items as there's no way for
   the script to know that those buffers are gone.

Also add unit tests for cmdline-win / terminal buffer menus

Note: This fix misc test_cmdline failures in MacVim due to the menu item
not being able to be removed.

This is a duplicate of vim/vim#5787
2020-03-16 01:18:26 -07:00
Yee Cheng Chin
e24c70d598 Add option to disable Touch Bar default fullscreen toggle button
Add new global var g:macvim_default_touchbar_fullscreen that can disable
the fullscreen Touch Bar button. Add documentation as well.

Fix #997.
2020-03-01 03:17:23 -08:00
Yee Cheng Chin
7b64f50d01 Merge remote-tracking branch 'vim/master' 2020-01-14 08:52:44 -08:00
Bram Moolenaar
e24c5b3332 patch 8.1.2416: loading menus sets v:errmsg
Problem:    Loading menus sets v:errmsg.
Solution:   Avoid setting v:errmsg and add a test for that. (Jason Franklin)
2019-12-10 22:11:53 +01:00
Yee Cheng Chin
171784f486 Merge remote-tracking branch 'vim/master' 2019-11-17 21:33:12 -08:00
Bram Moolenaar
5ef1c6a483 Update runtime files 2019-11-10 22:09:11 +01:00
Yee Cheng Chin
8eea335f95 Merge remote-tracking branch 'vim/master' 2019-09-30 03:25:15 -07:00
Bram Moolenaar
5be4ceecea Update runtime files. 2019-09-27 19:34:08 +02:00
Yee Cheng Chin
97af264c9a Merge remote-tracking branch 'vim/master' 2019-09-23 02:38:23 -07:00
Bram Moolenaar
30e9b3c425 Update runtime files 2019-09-07 16:24:12 +02:00
Yee Cheng Chin
b87cb34cde Merge remote-tracking branch 'vim/master' 2019-02-03 21:05:54 -08:00
Bram Moolenaar
314dd79cac Update runtime files. 2019-02-03 15:27:20 +01:00
Yee Cheng Chin
b3907e6722 Make Cmd-E work and always share to OS Find Pasteboard
Cmd-E (Edit -> Use Selection for Find") in most macOS apps follow the
convention that it shares to the system Find Pasteboard, while Cmd-G
uses the Find Pasteboard to find the next item. Make Cmd-E always do
that even if MMShareFindPboard is set to NO. This way, normal searches
in Vim wouldn't pollute the system find pasteboard, but could still have
a way to share to it by using this action.
2018-11-18 21:04:41 -08:00
Yee Cheng Chin
3df190c296 Fix MMShareFindPboard not working properly and update docs
MMShareFindPboard is supposed to prevent MacVim from updating the system
find pasteboard when searching, but the previous behavior was that it
would only set the Vim-specific format to the find pasteboard so you
could still share search patterns across Vim windows but it has the
effect of clearing the global find pasteboard. Just fix that by making
MacVim not touch the system find pasteboard at all when
MMShareFindPboard is set to NO to respect user's wish. Cmd-G will still
use the system find pasteboard to make it easy to search in another
macOS program and jump to Vim. The user can always use `n` instead if
that's not desired.

Also update docs to make this clear, and rename all "OS X" to "macOS" to
keep up with the times.

Close #773
2018-11-18 21:03:05 -08:00
Kazuki Sakamoto
93d7fe4bd5 Merge remote-tracking branch 'vim/master' 2018-10-23 21:32:59 -07:00
Bram Moolenaar
4c5d815256 patch 8.1.0487: no menus specifically for the terminal window
Problem:    No menus specifically for the terminal window.
Solution:   Add :tlmenu. (Yee Cheng Chin, closes #3439) Add a menu test.
2018-10-19 22:36:53 +02:00
Kazuki Sakamoto
ba7f8db26d Merge remote-tracking branch 'vim/master' 2018-08-28 19:38:47 -07:00
Bram Moolenaar
fc65cabb15 Update runtime files. 2018-08-28 22:58:02 +02:00
Yee Cheng Chin
e1bc03b773 Touch Bar add documentation, support enabled states, and system icons
Enabled states now work. E.g. a mapped Touch Bar button using "vmenu
TouchBar.DoStuff <nop>" will not show up in normal mode.

Also support specifying default Apple template icons. E.g. "an
icon=NSTouchBarListViewTemplate TouchBar.ShowList <Nop>"

Remove default TouchBar buttons as there were too many of them and most
of them are unlikely to be heavily used as there are direct Vim command
equivalent. Instead just add a single fullscreen toggle button. This can
be changed later.
2018-07-29 01:02:11 -07:00
Christoph Walcher
8fc72761a5 basic touchbarsupport 2018-07-26 22:05:04 -07:00
Kazuki Sakamoto
2aea7468fe Merge remote-tracking branch 'vim/master' 2018-07-23 17:35:04 -07:00
Bram Moolenaar
68f1b1b37f patch 8.1.0207: need many menu translation files to cover regions
Problem:    Need many menu translation files to cover regions.
Solution:   When there is no region match, try without. (Christian Brabandt)
2018-07-23 05:10:14 +02:00
Kazuki Sakamoto
91dcb1fa63 Merge remote-tracking branch 'vim/master' 2018-07-08 19:12:27 -07:00
Bram Moolenaar
6dc819b129 Updated runtime and language files. 2018-07-03 16:42:19 +02:00
Kazuki Sakamoto
0db36ff4a2 Merge remote-tracking branch 'vim/master' 2018-05-17 19:17:47 -07:00
Bram Moolenaar
7c63fbc46e Updated runtime files. 2018-05-17 13:15:23 +02:00
Kazuki Sakamoto
75c538530a Merge remote-tracking branch 'vim/master' 2017-11-09 23:53:43 -08:00
Kazuki Sakamoto
26de87631d Revert "Add Edit > Color Scheme > Find More Color Schemes."
This reverts commit 04d045a60f.
It will cause merge conflict.
2017-11-09 23:52:49 -08:00
Bram Moolenaar
040c1feb21 patch 8.0.1279: initializing menus can be slow
Problem:    Initializing menus can be slow, especially when there are many
            keymaps, color schemes, etc.
Solution:   Do the globbing for runtime files lazlily. (Ken Takata)
2017-11-09 19:45:48 +01:00
Morton Fox
677802357a Fix for menu not found: Tools.Spelling.To Next error 2017-03-06 17:15:14 -05:00
Kazuki Sakamoto
fbe364d061 Merge remote-tracking branch 'vim/master' 2017-03-05 21:29:31 -08:00
Bram Moolenaar
214641f77d Runtime file updates. 2017-03-05 17:04:09 +01:00
Kazuki Sakamoto
170f2f4598 Merge remote-tracking branch 'vim/master' 2017-02-22 18:43:24 -08:00
Bram Moolenaar
3df0173fa6 Updated runtime files. 2017-02-17 22:47:16 +01:00
Yousef El-Zebdeh
1e3514c02e Renamamed methods and inteface labels
Stay On Bottom > Stay in Back
Stay On Top > Stay in Front
These fit closer to Apple's terminology as seen with iOS simulator.
2017-01-05 06:24:09 +00:00
Yousef El-Zebdeh
263115a528 Three window level actions
Added three window level functions to MMAppController. These allow the
window to float on top, stay on bottom or revert back to normal status.

I have also added the commands to the Actions.plist. The commands were
added using the menu.vim file.
2017-01-05 02:40:56 +00:00
Lifepillar
04d045a60f Add Edit > Color Scheme > Find More Color Schemes.
Add a menu item to search for more color schemes in 'packpath'.
Modeled after Tools.Spelling.Find More Languages.
2016-10-16 10:15:43 +02:00
Kazuki Sakamoto
2ae331a486 Revert "Add themes under packpath to Edit > Color Scheme." 2016-10-15 11:51:59 -07:00
Lifepillar
c2ff332dca Add themes under packpath to Edit > Color Scheme.
Currently, in order to populate the Edit > Color Scheme menu, MacVim searches
for color schemes only in the paths defined in `runtimepath`. Since MacVim is
compiled with `+packages`, it makes sense to also look for color schemes under
`packpath`. This commit addresses this deficiency.

Note that color schemes may be found below `pack/*/opt` or
`pack/*/start` (see `:h pack-add`): `:colorscheme` searches both
locations.
2016-08-19 21:18:22 +03:00
Kazuki Sakamoto
24d6b9ae7d Update Edit menu, "Emoji & Symbols" 2016-08-10 20:00:51 -07:00
Kazuki Sakamoto
8bb6902421 Merge remote-tracking branch 'vim/master' 2016-08-01 20:32:22 -07:00
Bram Moolenaar
89eaa4185e patch 7.4.2135
Problem:    Various tiny issues.
Solution:   Update comments, white space, etc.
2016-07-31 14:17:27 +02:00
Kazuki Sakamoto
463f72af9d Merge remote-tracking branch 'vim/master' 2016-07-17 09:31:26 -07:00