Commit Graph

5670 Commits

Author SHA1 Message Date
Yee Cheng Chin
e3a5374446 Fix :hardcopy not working in macOS 13 Ventura
MacVim's `:hardcopy` implementation just uses Preview to show the
generated PostScript file and lets the user decide what to do with it.
macOS 13 Ventura removed PostScript support from Preview, so we now have
to manually convert it to PDF first using `pstopdf` (which is thankfully
bundled with macOS).

While we are at it, update the script so that we actually delete the
file after sending it to Preview. Previously MacVim never did that and
therefore leaks the file in a temp folder until Vim closes, which isn't
ideal for privacy. Now, just set a 10 sec timer to delete the file after
it's opened (we just need enough time to allow Preview to open and load
the file, which doesn't take much time. The 10 sec timer is to account
for slow computers).

Fix #1347
2023-03-18 03:00:26 -07:00
Yee Cheng Chin
841c6ab865 Merge remote-tracking branch 'vim/master' 2023-03-14 18:16:13 -07:00
Dominique Pelle
e764d1b421 patch 9.0.1403: unused variables and functions
Problem:    Unused variables and functions.
Solution:   Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
2023-03-12 21:20:59 +00:00
Yee Cheng Chin
462d89cb89 Merge pull request #1386 from ychin/login-shell-docs
Improve login shell docs
2023-03-10 23:28:56 -08:00
Yee Cheng Chin
a11766d384 Improve login shell docs
Make it clearer that login shells can be turned off via MMLoginShell
config.
2023-03-10 23:03:09 -08:00
lagygoill
4df0772a41 patch 9.0.1399: highlight test script has a few problems
Problem:    Highlight test script has a few problems.
Solution:   Rewrite the script in Vim9 syntax. (closes #10379)
2023-03-10 18:37:11 +00:00
Gianmaria Bajo
6a7c774920 patch 9.0.1397: highlight for popupmenu kind and extra cannot be set
Problem:    Highlight for popupmenu kind and extra cannot be set.
Solution:   Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
            highlight groups and use them. (Gianmaria Bajo, closes #12114)
2023-03-10 16:35:53 +00:00
Bram Moolenaar
be19d78c3d patch 9.0.1396: sort(list, 'N') does not work in Vim9 script context
Problem:    sort(list, 'N') does not work in Vim9 script context.
Solution:   Convert string to number without giving an error. (closes #12061)
2023-03-09 22:06:49 +00:00
Amaan Qureshi
638388b8ef patch 9.0.1395: Odin files are not recognized
Problem:    Odin files are not recognized.
Solution:   Add a pattern for Odin files. (Amaan Qureshi, closes #12122)
2023-03-08 20:35:17 +00:00
Amaan Qureshi
cde1f8714e patch 9.0.1394: Unx Tal files are not recognized
Problem:    Unx Tal files are not recognized.
Solution:   Add a pattern for Unx Tal files. (Amaan Qureshi, closes #12117)
2023-03-08 19:55:50 +00:00
Yee Cheng Chin
bded0905e0 Fix 'gdefault' etc help tags being broken
MacVim's docs for 'fuoptions' above didn't terminate a code block which
resulted in the 'gdefault' help tags being broken as they were treated
as code blocks as well. Fix up the docs properly.
2023-03-08 11:22:04 -08:00
Amaan Qureshi
ff226d49fe patch 9.0.1393: Cairo files are not recognized
Problem:    Cairo files are not recognized.
Solution:   Add a pattern for Cairo files. (Amaan Qureshi, closes #12118)
2023-03-08 16:39:21 +00:00
Amaan Qureshi
4ed914b18a patch 9.0.1368: Bass files are not recognized
Problem:    Bass files are not recognized.
Solution:   Add patterns for Bass files. (Amaan Qureshi, closes #12088)
2023-03-02 12:51:18 +00:00
Yee Cheng Chin
9bf55ef10d Clean up syntax / formatting / typos in MacVim docs
Add "MACVIM REFERENCE" to syntax rule to reflect the new header to make
it look less weird. Also remove the "last changed date" header since I
rarely update it and it's not particularly useful given how in MacVim
the runtime is always bundled anyway.

Also, when investigating using Neovim's treesitter vim docs generating
tool for MacVim (to generate a web version of the documentation), found
a few typos / formatting issues. Fix them here.
2023-03-01 23:07:46 -08:00
Yee Cheng Chin
cbb385a715 Fix documentation back to having space before "~"
Previous commit trying to fix help file style error erroneously removed
the space, which should have been there.
2023-03-01 19:14:02 -08:00
Yee Cheng Chin
7af806d3de Fix help files style check failure in CI 2023-03-01 17:18:37 -08:00
Yee Cheng Chin
88b74d85d6 Merge remote-tracking branch 'vim/master' 2023-03-01 00:50:37 -08:00
Bram Moolenaar
dd60c365cd Update runtime files 2023-02-27 15:49:53 +00:00
Amaan Qureshi
80c5b2c0f7 patch 9.0.1360: Cue files are not recognized
Problem:    Cue files are not recognized.
Solution:   Add patterns for Cue files. (Amaan Qureshi, closes #12067)
2023-02-27 14:32:08 +00:00
Amaan Qureshi
def5521752 patch 9.0.1351: Dhall files are not recognized
Problem:    Dhall files are not recognized.
Solution:   Add patterns for Dhall files. (Amaan Qureshi, closes #12052)
2023-02-24 16:01:54 +00:00
Amaan Qureshi
c2254764bc patch 9.0.1350: CPON files are not recognized
Problem:    CPON files are not recognized.
Solution:   Add patterns for CPON files. (Amaan Qureshi, closes #12053)
2023-02-24 12:08:45 +00:00
Amaan Qureshi
44e08c1cf8 patch 9.0.1348: Un-grammar files are not recognized
Problem:    Un-grammar files are not recognized.
Solution:   Add patterns for Un-grammar files. (Amaan Qureshi, closes #12034)
2023-02-23 20:31:08 +00:00
Amaan Qureshi
ca06b30073 patch 9.0.1346: Starlark files are not recognized
Problem:    Starlark files are not recognized.
Solution:   Add patterns for Starlark files. (Amaan Qureshi, closes #12049)
2023-02-23 15:38:49 +00:00
Amaan Qureshi
cfce5cf542 patch 9.0.1337: yuck files are not recognized
Problem:    Yuck files are not recognized.
Solution:   Add a filetype pattern for yuck files. (Amaan Qureshi,
            closes #12033)
2023-02-21 15:18:50 +00:00
Bram Moolenaar
938ae280c7 Update runtime files. 2023-02-20 20:44:55 +00:00
Darren Kavanagh
a03fba9925 Update gui_mac.txt
Update gui_mac.txt headings to match MacVim release.
2023-02-18 23:04:48 -08:00
Matthias Queitsch
9de960ace0 patch 9.0.1319: PRQL files are not recognized
Problem:    PRQL files are not recognized.
Solution:   Add a filetype pattern for PRQL files. (Matthias Queitsch,
            closes #12018)
2023-02-18 12:04:37 +00:00
Yegappan Lakshmanan
3ec78f973f patch 9.0.1300: 'statusline' only supports one "%=" item
Problem:    'statusline' only supports one "%=" item.
Solution:   Add support for multiple "%=" items. (TJ DeVries, Yegappan
            Lakshmanan, closes #11970, closes #11965)
2023-02-11 11:15:25 +00:00
Yee Cheng Chin
c53718f8a3 Merge remote-tracking branch 'vim/master' 2023-02-11 01:44:26 -08:00
Amaan Qureshi
6642982bea patch 9.0.1291: Move language files are not recognized
Problem:    Move language files are not recognized.
Solution:   Recognize Move language files. (Amaan Qureshi, closes #11947)
2023-02-07 19:37:32 +00:00
Amaan Qureshi
91deac4539 patch 9.0.1288: FunC files are not recognized
Problem:    FunC files are not recognized.
Solution:   Recognize FunC files. (Amaan Qureshi, closes #11949)
2023-02-06 19:32:07 +00:00
Yee Cheng Chin
be09129614 Downgrade sh.vim syntax from version 205 to 204
The latest Vim runtime update upgraded sh.vim from version 204 to 205,
which contains a bug (https://github.com/vim/vim/issues/11937). Since we
are releasing MacVim soon, simply revert this change to have a stable
build and we will revert this when Vim has fixed this upstream.
2023-02-06 05:51:18 -08:00
Amaan Qureshi
c8ef30bc2e patch 9.0.1282: Ron files are not recognized
Problem:    Ron files are not recognized.
Solution:   Recognize Ron files. (Amaan Qureshi, closes #11948)
2023-02-05 14:47:46 +00:00
Janez Podhostnik
cb626a4692 patch 9.0.1281: Cadence files are not recognized
Problem:    Cadence files are not recognized.
Solution:   Recognize Cadence files. (Janez Podhostnik, closes #11951)
2023-02-05 13:01:40 +00:00
Amaan Qureshi
4ad8ae8465 patch 9.0.1278: go.work.sum files are not recognized
Problem:    go.work.sum files are not recognized.
Solution:   Recognize go.work.sum files as the gosum filetype. (Amaan Qureshi,
            closes #11940)
2023-02-04 12:12:36 +00:00
Yee Cheng Chin
19d0419569 Merge remote-tracking branch 'vim/master' 2023-02-04 02:27:59 -08:00
Bram Moolenaar
4be18e77ff patch 9.0.1276: some mappings with Meta and Shift do not work
Problem:    Some mappings with Meta and Shift do not work.
Solution:   Apply the Shift modifier to the key. (issue #11913)
2023-02-03 12:28:07 +00:00
Bram Moolenaar
be4e01637e Update runtime files. 2023-02-02 13:59:48 +00:00
Amaan Qureshi
685bf83b73 patch 9.0.1274: FIRRTL files are not recognized
Problem:    FIRRTL files are not recognized.
Solution:   Add a pattern for FIRRTL files. (Amaan Qureshi, closes #11931)
2023-02-02 13:30:13 +00:00
zeertzjq
e8d4ae0d11 patch 9.0.1272: typo in pattern for filetype detection
Problem:    Typo in pattern for filetype detection.
Solution:   Fix the typo. (closes #11924)
2023-02-01 15:31:23 +00:00
Mark Skelton
9c51798a1f patch 9.0.1268: .clangd and .stylelintrc files don't get a filetype
Problem:    .clangd and .stylelintrc files don't get a filetype.
Solution:   Use yaml for .clangd and json for .stylelintrc files. (Mark
            Skelton, closes #11916)
2023-01-31 18:57:17 +00:00
Amaan Qureshi
907349a743 patch 9.0.1263: KDL files are not recognized
Problem:    KDL files are not recognized.
Solution:   Add a pattern for KDL files. (Amaan Qureshi, closes #11898)
2023-01-30 15:19:57 +00:00
Yee Cheng Chin
d1c8e612fe Fix CoreText clipping issues with tall texts
This fixes the issue where particularly tall characters will get clipped
at the row boundary. This happens because even though a font describes
the line height with font metrics, individual glyphs do not have to
respect them, and we can see with emoji rendering sometimes they can
poke upwards past the line height. Also, it's trivially easy to
construct composing characters that become really tall, e.g. "x゙̂⃗", or
Tibetan scripts like "ཧཱུྃ".

To fix this, we do the following:

1. Remove the explicit clipping call at rendering.

2. Fix partial redraw to not lead to clipping / corruption. This is
   quite tricky, because let's say we have a character that is tall
   enough to touch other lines, if those lines are redraw but not the
   line with the tall char, the redraw will paint over the parts of the
   glyphs poking through. Alternatively if we redraw the line with the
   tall chars we also need to expand the redraw region to make sure
   other lines get repainted as well. To fix this properly, we should do
   a proper glyph calculation when we receive the draw command before we
   issue before we call `setNeedsDisplayInRect`, but since right now we
   only extract glyph info later (during drawRect call), it's too late.
   We just do the hacky solution by storing a variable
   `redrawExpandRows` that tracks how many lines to expand for all
   lines. It's a little hacky since this will affect all lines
   permanently regardless if they have tall characters or not. The
   proper fix may come later as an optimization (or when we do hardware
   rendering via Metal).

3. Re-order the rendering so we have a two pass system, where we first
   draw the background fill color for all rows, then the text. This
   helps prevent things like Vim's window split or cursorline from
   obscuring the text.

4. Add a preference to turn on clipping (old behavior). This helps
   prevent odd issues with really tall texts (e.g. Zalgo text) making it
   hard to see what's going on. The preference `MMRendererClipToRow` is
   not exposed in UI for now as it's a relatively niche. It will be
   exposed later when we have a dedicated render tab in settings.

Note that a lot of these characters only show their full height by doing
`set maxcombine=8` because the default (2) is quite low.

Part of the fix for #995
2023-01-29 16:10:16 -08:00
Yee Cheng Chin
325e09dfcf Merge remote-tracking branch 'vim/master' 2023-01-29 15:07:18 -08:00
Amaan Qureshi
2a99fe6c41 patch 9.0.1261: Elsa files are not recognized
Problem:    Elsa files are not recognized.
Solution:   Add a pattern for Elsa files. (Amaan Qureshi, closes #11908)
2023-01-29 17:50:14 +00:00
ObserverOfTime
04e4f1d985 patch 9.0.1256: NetworkManager connection files are not recognized
Problem:    NetworkManager connection files are not recognized.
Solution:   Add a pattern for NetworkManager connection files. (closes #11893)
2023-01-28 18:05:40 +00:00
zeertzjq
5c8771bc5a patch 9.0.1238: :runtime completion can be further improved
Problem:    :runtime completion can be further improved.
Solution:   Also complete the {where} argument values and adjust the
            completion for that. (closes #11874)
2023-01-24 12:34:03 +00:00
zeertzjq
3770f4c9cd patch 9.0.1231: completion of :runtime does not handle {where} argument
Problem:    Completion of :runtime does not handle {where} argument.
Solution:   Parse the {where} argument. (closes #11863)
2023-01-22 18:38:51 +00:00
Amaan Qureshi
f3da4c8427 patch 9.0.1230: Apache thrift files are not recognized
Problem:    Apache thrift files are not recognized.
Solution:   Add a pattern for thrift files. (Amaan Qureshi, closes #11859)
2023-01-22 18:16:44 +00:00
Amaan Qureshi
040e795e8d patch 9.0.1229: Cap'n Proto files are not recognized
Problem:    Cap'n Proto files are not recognized.
Solution:   Add a pattern and the "capnp" filetype. (Amaan Qureshi,
            closes #11862)
2023-01-22 13:10:39 +00:00