Commit Graph

31163 Commits

Author SHA1 Message Date
Yee Cheng Chin
8e7808c296 MacVim r181
Updated to Vim 9.1.1128

This update contains a completely new GUI tabs implementation by @sfsam!
It also contains lots of small fixes for window resizing and full screen
mode that aims to make using MacVim feel rock solid and stable.

Defaults Change
====================

New settings defaults related to window sizing #1528:

- "Smoothly resizes window" is now on by default. MacVim's window will
  now resize smoothly instead of snapped to the size of the character
  grid.
- Vim's `guioption` now has `k` set by default (`:h go-k`). This
  prevents MacVim's window size from changing unnecessarily when
  showing/hiding tabs or changing font size.

These should align MacVim better with how other apps work and integrate
better with OS window management, including macOS 15 Sequoia's window
tiling feature.

Features
====================

Tabs
--------------------

MacVim has a new tabs implementation! The old version (PSMTabBarControl)
is not maintained and lacks features such as overflowing tabs and
customizable colors. The new tabs will overflow horizontally and are
scrollable. They also animate when tabs are closed or moved, respect
system settings such as right-to-left locales and high-contrast modes,
and are designed to fit within the currently selected Vim colors.

There are a few ways to customize the colors of the new tabs, under the
"Appearance" settings pane. MacVim defaults to an "Automatic colors"
mode which tries to pick sensible colors automatically based on the
current foreground/background colors. However, you can also configure it
to simply use the tab colors specified by the Vim color scheme (some
color schemes will work better than others depending on their choice of
colors). Another new option is "Use tabs background color" which when
combined with "Transparent title bar" allows the title bar and tabs to
look like a single cohesive whole.

Relevant work:

- #1120 (by @sfsam)
- Also: #1535 / #1536 / #1537 / #1538 / #1539 / #1557 / #1558 / #1560

New Vim features
--------------------

- new bundled color scheme:
    - unokai (vim/vim#16443)
- new bundled optional plugins (use `packadd` to enable them):
    - helptoc: Use `:HelpToc` to show an interactive table of contents
      for Vim help, man pages, Markdown files, and terminal.
      vim/vim#10446
- new options:
    - `set diffopt+=linematch:{n}`. Matches lines better when in diff
      mode. v9.1.1099
    - `findfunc`. Customizes `:find` and other commands. v9.1.0831
    - `set completeopt+=preinsert`. Preview inserted text in completion.
      v9.1.1056
    - `messagesopt`. Allows customizing hit-enter behavior. v9.1.0908
- new functions:
    - `getcellpixels()`. Query the pixel size of a character cell in the
      grid. v9.1.0854 / #1554 / #1555
- Vim tutor has a new interactive plugin (v9.1.0836). There is also now
  a chapter 2 (vim/vim#5729).

Misc New Settings
--------------------

- "Open untitled window" (General) has a new option to only open on
  MacVim re-activation. #1509
- "Show document icon at title bar" (Appearance). Previously MacVim
  implicitly hid the document icon when using transparent title bar.
  This is now customizable. #1510

General
====================

- The MacVim dmg installer has a new design. Courtesy of @jasonlong.
  #1540 #1545
- Legacy builds (macOS 10.9 - 10.12) are no longer built by GitHub
  hosted runners, due to GitHub's deprecation of old runners. They are
  now built by a custom self-hosted VM instead. In the future we hope to
  set up reproducible builds (#1506) so it will not matter who's
  building the app as it would be verifiable. #1559
- "Nightly" build: We now build a dmg installer for every commit. This
  allows for trying out the latest developmental version of MacVim, but
  note that the app will not be signed / notarized, and it will not be
  as polished as official release/pre-release builds. See
  [wiki](https://github.com/macvim-dev/macvim/wiki/Installing) for
  instructions. #1532

Fixes
====================

Apple "Intelligence" Writing Tools
--------------------

macOS 15 Sequoia's Apple "Intelligence" Writing Tools should work
correctly with MacVim now. To use it, select some text, right click to
show menu, and then select the "Writing Tools" sub-menu. As part of this
fix, the integration with the "Services" menu now works more reliably as
well. You can select texts in blockwise visual mode and select a service
and MacVim will try to place the new texts back to the blockwise
selection if possible. #1552

Window resizing and full screen
--------------------

- Flicker begone: Changing font size, showing/hiding tabs or scroll
  bars, or entering non-native full screen should no longer cause MacVim
  to flicker. Previously there could be a momentary but
  distracting/annoying stale image that flashes briefly. #1547 #1549
- Fixed issue where resizing MacVim window would occasionally cause Vim
  to be stuck in a stale wrong size. #1518
- Non-native full screen now supports `blurradius` option. #1546
- Fixed window size not always restoring correctly when exiting full
  screen. Non-native full screen also works more reliably in
  multi-monitor setup. #1525
- Fixed non-native full screen mode when using an external monitor with
  a MacBook with a notch, and having the "Show menu bar in non-native
  mode" option set. Previously MacVim would sometimes miscalculate the
  menu bar height in the second screen. #1548
- Fixed misc issues with non-native full screen's interaction with
  `fuoptions` and also the `transparency` setting, and rare crash. #1521

Other Fixes
--------------------

- Fixed issue where changing font size (using Cmd =/-) with guifont set
  to "-monospace-" would result in guifont being changed to a confusing
  name like ".AppleSystemUIFontMonospaced-Regular". #1544
- "MacVim Website" menu item now goes to the updated URL. #1524
- What's New page now allows changing font size (using Cmd =/-), and
  showing table of contents. #1561 #1562
- Dark mode documentation is now a bit clearer on `v:os_appearance`.
  #1511
- Using dictionary look up on selected texts (by right clicking and then
  selecting "Look Up" in the pop-up menu) is now more resilient as it
  uses Vim's native `getregion()` to determine the selected texts. #1508

Scripting
====================

- Scripting languages versions:
    - Ruby is now built against 3.4, up from 3.3.
    - Perl is now built against 5.34, up from 5.30.

Compatibility
====================

Requires macOS 10.9 or above. (10.9 - 10.12 requires downloading a
separate legacy build)

Script interfaces have compatibility with these versions:

- Lua 5.4
- Perl 5.34
- Python2 2.7
- Python3 3.9 or above
- Ruby 3.4
release-181
2025-02-20 16:05:49 -08:00
Yee Cheng Chin
3710248dbc Merge pull request #1562 from ychin/fix-whatsnew-url-comparison
Fix What's New URL checking logic to compare port correctly
2025-02-20 14:47:14 -08:00
Yee Cheng Chin
af567e9eb0 Fix What's New URL checking logic to compare port correctly
In a normal HTTP URL the port will be nil, which doesn't equal itself.

This bug was introduced by #1561 when it tried to add more granular
comparison to URL checking to allow for anchor links.
2025-02-20 14:45:48 -08:00
Yee Cheng Chin
08e946fa19 Merge remote-tracking branch 'vim/master' 2025-02-20 14:16:05 -08:00
Lucas Eekhof
27f5136761 runtime(mail): add commentstring '> %s' to ftplugin
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".

Solution: Add commentstring to `> %s` to be used in files of type mail.

closes: #16669

Signed-off-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:32:07 +01:00
Yegappan Lakshmanan
e3fed4828c patch 9.1.1128: patch 9.1.1119 caused a regression with imports
Problem:  patch 9.1.1119 caused a regression with imports
          (girishji)
Solution: revert the script ID change for the class script variable for
          now (Yegappan Lakshmanan)

fixes: #16664
closes: #16670

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:20:54 +01:00
dringsim
106899eb21 runtime(dnsmasq): include simple filetype plugin
closes: #16671

Signed-off-by: dringsim <dringsim@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:19:23 +01:00
glepnir
52fd867f5e patch 9.1.1127: preinsert text is not cleaned up correctly
Problem:  when 'completeopt' is set to preinsert the preinserted text is
          not cleared when adding new leader (Yee Cheng Chin)
Solution: add a condition to delete preinsert text in edit function
          (glepnir)

closes: #16672

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:13:24 +01:00
glepnir
4418041698 patch 9.1.1126: patch 9.1.1121 used a wrong way to handle enter
Problem:  patch 9.1.1121 used a wrong way to handle enter
Solution: compl_enter_selects also needs to consider the selected item
          in ins_compl_new_leader() (glepnir)

closes: #16673

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:09:48 +01:00
glepnir
3af0a8d8f5 patch 9.1.1125: cannot loop through pum menu with multiline items
Problem:  cannot loop through pum menu with multiline items with
          fuzzy and noselect in 'completeopt' (Tomasz N)
Solution: remove unnecessary compl_no_select condition (glepnir)

fixes: #16641
closes: #16674

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:06:16 +01:00
zeertzjq
08a83a033a patch 9.1.1124: No test for 'listchars' "precedes" with double-width char
Problem:  No test for 'listchars' "precedes" with double-width char.
Solution: Add a test and fix a typo in code (zeertzjq).

closes: #16675

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:04:09 +01:00
Yee Cheng Chin
e700ddeea4 patch 9.1.1123: popup hi groups not falling back to defaults
Problem:  Highlight groups PopupSelected/PopupNotification/
          MessageWindow are supposed to fall back to default highlight
          groups if they are not defined. However, once a colorscheme
          has defined them, switching to another colorscheme that
          doesn't do so will leave behind a cleared colorscheme, which
          causes the fallback to fail.

Solution: Set up default links to the relevant fallback highlight
          groups, which makes sure a `:hi clear` command will reset the
          state properly (Yee Cheng Chin).

closes: #16676

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 21:58:21 +01:00
David Mandelberg
911742a975 runtime(dosini): Add support for # comments to ftplugin
runtime/syntax/dosini.vim supports both ; and # as comments, and I think
a bunch of the files detected as dosini do too, so add support for # to
the ftplugin.

closes: #16681

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 20:43:10 +01:00
Yee Cheng Chin
d5218a81b4 Merge pull request #1561 from ychin/whatsnew-fontsize-allow-anchors
Add font size up/down support and allow anchor links for What's New page
2025-02-20 06:13:14 -08:00
Yee Cheng Chin
7402362114 Add font size up/down support and allow anchor links for What's New page
The anchor links are for table of contents links that our release notes
will start to generate.
2025-02-20 05:54:00 -08:00
Yee Cheng Chin
7861c788f0 Merge pull request #1560 from ychin/tabs-fix-hover-button-image-recursion
Tabs: Fix MMHoverButton poor usage of images and potential stack overflow
2025-02-19 21:37:33 -08:00
Yee Cheng Chin
f4680b8f79 Tabs: Fix MMHoverButton poor usage of images and potential stack overflow
Fix hover buttons to not keep setting image on itself everytime a fg
color is changed, leading to each image referring to the last one. If a
display changed happens and macOS triggers a redraw, this could
sometimes lead to a stack overflow crash.

Just simplify the code and properly separate out the image template and
the derived images. This also makes sure we properly free the old
images when we change fg color where we discard the last image and make
a new one.
2025-02-19 21:13:55 -08:00
Yee Cheng Chin
9b30caf13d Merge pull request #1559 from ychin/ci-self-hosted-github-runner-legacy-build
ci: Add support for using self-hosted runners for legacy builds
2025-02-18 23:44:54 -08:00
Yee Cheng Chin
460dffeb9f ci: Add support for using self-hosted runners for legacy builds
MacVim legacy builds target macOS 10.9, which needs Xcode 14.0.1 or
below. However, GitHub Actions no longer has a runner that has that
installed as macos-12 was removed and macos-13 has newer Xcode versions.
We are setting up a custom self-hosted runner that has Xcode 14.0.1
installed and configure GitHub Actions to use that to build legacy
builds. Only do this when making a full release because this has to be
spun up manually.

One big problem with setting up such a workflow is that GitHub Actions'
workflow syntax does not provide a way to selectively skip certain
matrix configuration in the `runs-on` field. The cleanest solution
(which is still quite messy) is to refactor the build-and-test step into
a separate reusable workflow, and have the parent workflow invoke it
with a "skip" boolean flag for each matrix entry. The child workflow
will then use that to selectively decide to run the job or not. It does
mean the CI YAML file is now split into two. This does have some
benefits since if we want to add reproducible builds in the future
(#1506) this would allow us to set up a new workflow that builds MacVim
the same way when a new release is made and verify that it's been built
properly.
2025-02-18 23:12:57 -08:00
Yee Cheng Chin
4af622dfd6 Merge remote-tracking branch 'vim/master' 2025-02-18 20:27:53 -08:00
John Marriott
d6e3c9048d patch 9.1.1122: too many strlen() calls in findfile.c
Problem:  too many strlen() calls in findfile.c
Solution: refactor findfile.c and remove calls to strlen()
          (John Marriott)

closes: #16595

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:45:48 +01:00
glepnir
07f0dbe3aa patch 9.1.1121: Enter does not insert newline with "noselect"
Problem:  Enter does not insert newline with "noselect" when the pum is
          visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
          ins_compl_prep returns false, and the edit function continues
          processing Enter to insert a new line. (glepnir)

fixes: #1653
closes: #16653

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:27:30 +01:00
Luca Saccarola
ee1a24b21d runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: #16609

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:11:51 +01:00
Christian Brabandt
44c1c04ddb patch 9.1.1120: tests: Test_registers fails
Problem:  tests: Test_registers fails
          (T.J. Townsend, after v9.1.1115)
Solution: require clipboard feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 22:27:45 +01:00
Christian Brabandt
5647c91355 runtime(doc): add reference to extendnew() at extend()
related: #16607

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 21:33:30 +01:00
Yegappan Lakshmanan
778ada48fb patch 9.1.1119: Vim9: Not able to use an autoloaded class from another autoloaded script
Problem:  Vim9: Not able to use an autoloaded class from another
          autoloaded script (Elliot)
Solution: make it work (Yegappan Lakshmanan)

fixes: #15031
closes: #16652

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:21:23 +01:00
Christian Brabandt
b34a688ba0 patch 9.1.1118: tests: test_termcodes fails
Problem:  tests: test_termcodes fails
          (after: v9.1.1114)
Solution: adjust the test for the expected termguicolors value

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:09:11 +01:00
Doug Kearns
68ba6c2c6c runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: #16645

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
Hirohito Higashi
5887cce1d7 patch 9.1.1117: there are a few minor style issues
Problem:  there are a few minor style issues
Solution: fix the issues (Hirohito Higashi)

closes: #16646

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:34:30 +01:00
Yegappan Lakshmanan
b5f463ce4f patch 9.1.1116: Vim9: super not supported in lambda expressions
Problem:  Vim9: super not supported in lambda expressions
          (Aliaksei Budavei)
Solution: Support using the super keyword in a closure in an instance
          method (Yegappan Lakshmanan)

fixes: #16586
closes: #16647

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:25:24 +01:00
Yegappan Lakshmanan
44831e4bea runtime(doc): Update the 'specifies' keyword documentation, slightly reformat
closes: #16648

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:23:07 +01:00
Christian Brabandt
c0f0e2380e patch 9.1.1115: [security]: use-after-free in str_to_reg()
Problem:  [security]: use-after-free in str_to_reg()
          (fizz-is-on-the-way)
Solution: when redirecting the :display command, check that one
          does not output to the register being displayed

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:06:38 +01:00
Christian Brabandt
27822a0441 patch 9.1.1114: enabling termguicolors automatically confuses users
Problem:  enabling termguicolors automatically confuses users. Since
          querying the terminal for the RGB flag happens asynchronously,
          enabling termguicolors is noticeable by users as the highlighting changes
          and is therefore unexpected.
          (after v9.1.1054)
Solution: comment out that part for now. We may need another way to
          enable this in the future.

fixes: #16539
fixes: #16568
fixes: #16649

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 09:30:00 +01:00
Yee Cheng Chin
8969ff8787 Merge pull request #1558 from ychin/mmtabs-automatic-colors-tuning
Tabs: Tune automatic colors and use LAB for deriving colors
2025-02-15 03:47:16 -08:00
Yee Cheng Chin
25b448f236 Tabs: Tune automatic colors and use LAB for deriving colors
Tune how automatic colors are derived. It used to use a custom
brightness calculation formula to determine in background color is light
or dark, then then simply interpolate the background color to either
white or black to drive the fill and tab colors. There were a couple
issues:
- Really dark background color would end up interpolating more than a
  moderately dark color, leading to the fill color being desaturated and
  also perceptually far from background color leading to a
  high-constrast look. Ideally we want to have a fixed offset in terms
  of perceptual difference between fill and background color.
- The brightness calculation was wrong and flipped the green and blue
  coefficients. Also, calculating perceptual brightness in sRGB gamma
  space is inherently wrong as the components are not linear.
- Blending colors in sRGB space are also not ideal because we are
  blending in gamma space (not linear), and also perceptually each
  component will contribute differently.

To fix this, use CIE LAB colors and just change the L* component of the
colors in fixed offsets to calculate a new color that's a
brighter/darker version fo the previous one. This is not completely
accurate but gives a more stable result over a large range of input
colors. The new fill / tab colors are a little more saturated as a
result which subjectively may or may not be more pleasant but with
automatic colors it won't be perfect, and the user who cares would
likely use Vim colorscheme mode instead.
2025-02-15 03:20:07 -08:00
Vladyslav Rehan
3f60114236 runtime(keymap): Add ukrainian-enhanced keymap
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.

Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.

There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.

closes: #16628

Signed-off-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
Signed-off-by: Ivan Korneliuk <vansha@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-15 09:59:57 +01:00
Yee Cheng Chin
8bac9064f7 Merge pull request #1557 from ychin/mmtabs-vim-colorscheme-fixes
Tabs: Use TabLineFill fg, fix colorscheme w/ transparent/inverse highlights
2025-02-14 21:44:21 -08:00
Yee Cheng Chin
aaf55031bf Tabs: Use TabLineFill fg, fix colorscheme w/ transparent/inverse highlights
When using Vim colorscheme mode, fix the fill foreground colors (used
for add tab and scroll buttons) to use the colorscheme's TabLineFill's
guifg colors. Previously they were automatically calculated based on the
other foreground colors which worked for automatic colors but not when
we are using a colorscheme where it may not match. Just use the one
specified in color scheme. Colorschemes like everforest and koehler
should have visible buttons now.

Also, fix the previous broken logic for parsing the colorscheme colors.
It was not accounting for transparent colors where missing colors or
cleared highlight groups should fall through to default bg/fg colors
(e.g. delek and catppuccin do this for TabLineSel). It also wasn't
respecting the `gui=reverse` flag (which means bg/fg colors should be
flipped) that some colorschemes (e.g. Solarized) uses.

Also, include a fix to builtin colorscheme 'retrobox' where the
TabLineFill group isn't set correctly. This is fixed upstream but
including it here to save some round trip time. See
vim/colorschemes#273.
2025-02-14 20:59:07 -08:00
Yee Cheng Chin
e67eff2e24 patch 9.1.1113: tests: Test_terminal_builtin_without_gui waits 2 seconds
Problem:  tests: Test_terminal_builtin_without_gui waits 2 seconds
Solution: add --not-a-term to remove the annoying 2s delay in error
          message when Vim detects that stdio are not from a terminal
          (Yee Cheng Chin)

closes: #16635

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 18:01:25 +01:00
zeertzjq
b6c900be9c patch 9.1.1112: Inconsistencies in get_next_or_prev_match()
Problem:  Inconsistencies in get_next_or_prev_match() (after 9.1.1109).
Solution: Change "file" to "entry" or "match" in comments.  Use the same
          order of branches for PAGEUP and PAGEDOWN (zeertzjq).

closes: #16633

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:59:31 +01:00
glepnir
faf4112cdc runtime(doc): document ComplMatchIns highlight for insert-completion
closes: #16636

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:57:52 +01:00
Luca Saccarola
73d8222b31 runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: #16638

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:54:22 +01:00
Yee Cheng Chin
961c25235b Merge pull request #1556 from ychin/fix-test-dark-mode-flakiness
Fix MacVim dark mode test being a little flaky
2025-02-13 23:16:06 -08:00
Yee Cheng Chin
fa4f21c122 Fix MacVim dark mode test being a little flaky
We need to make sure to wait for Vim to handle the system appearance
change message before querying it or it would be subject to timing
issues.
2025-02-13 20:50:31 -08:00
Yee Cheng Chin
d4f3eca4ee Merge pull request #1555 from ychin/getcellpixels-update-docs-delay
Update getcellpixels() docs to point out the delay in MacVim GUI
2025-02-13 19:24:55 -08:00
Yee Cheng Chin
0b82a98ba9 Update getcellpixels() docs to point out the delay in MacVim GUI
#1554 added support for `getcellpixels()`, but it has a quirk in MacVim
in that it has a slight delay due to MacVim's asynchronous nature. Make
sure the documentation reflects that to avoid surprises.
2025-02-13 19:22:51 -08:00
Yee Cheng Chin
347d8c7327 Merge pull request #1554 from ychin/getcellpixels-support
Implement getcellpixels() for MacVim
2025-02-13 17:58:10 -08:00
Yee Cheng Chin
dd1a253df4 Implement getcellpixels() for MacVim
Don't use `gui.char_width` / `char_height` unlike the other GVim
implementations. Those are used for deriving screen pixel sizes and
MacVim has been hard-coding them to 1 for simplicity since the actual
GUI functionality is handled out of the Vim process anyway. Changing
those values would require some refactoring. Instead, just use a new
variable to store them.

Note that there is a delay with this method, as we only update Vim's
knowledge of cell size after MacVim has received the font change
message. This means if a user wants to immediately query getcellpixels()
in vimrc or after changing guifont this will not work. This is a
deliberate design choice to avoid having to add synchronous state query
APIs to MacVim, but it's possible to change it in the future. The
handling of this message did get placed in `processInput:` which means
it will be picked up whenever we sleep or process messages in Vim,
instead of only when waiting for keys (where most of other MacVim
messages are handled in `processInputQueue`).

Related: vim/vim#16004
2025-02-13 17:36:28 -08:00
Yee Cheng Chin
e2f0b2421e Merge remote-tracking branch 'vim/master' 2025-02-13 14:15:55 -08:00
Hirohito Higashi
bf7c88d852 patch 9.1.1111: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
          (lifepillar)
Solution: fix import and class extends (Hirohito Higashi)

fixes: #16379
related: #16440
closes: #16602

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 21:04:07 +01:00