Commit Graph

26585 Commits

Author SHA1 Message Date
Yee Cheng Chin a9ac6c80df MacVim Release 174
Updated to Vim 9.0.472.

Announcements
====================

Sponsors
--------------------

MacVim now allows you to sponsor the team! Any amount would be
appreciated and it is of course optional. See the announcement (#1271)
for more details.

Supporting old versions of macOS (10.12 or below)
--------------------

Currently, macOS supports macOS 10.9 or above. However, this is getting
harder to do so as time goes on (e.g. the latest Xcode doesn't support
building for it). In the near future, MacVim will mostly target 10.13
(High Sierra) or above, with 10.9 - 10.12 as legacy support. Visit this
discussion (#1288) if you would be affected and would like to know more.

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

Resizing MacVim new options
--------------------

You can now smoothly drag and resize MacVim without having it
constrained to fixed multiples of the text size, by setting the
"Smoothly resizes window" under General preference pane. This also
allows MacVim to behave better when used with third-party tools (e.g.
BetterSnapTool) to snap it to one side of the screen. #1276

The command line can now be pinned to the bottom of the window with a
setting (under Appearance preference pane). This makes it look better
aligned when using smooth resizing, or in other situations where the
window size is not a direct multiples of Vim's text size (e.g. full
screen or guioption+=k). #1280

New supported text styles
--------------------

Vim highlight groups `strikethrough`, `underdouble`, `underdotted`,
`underdashed` are now supported. #1287

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

Virtual text allows you to place custom texts to be displayed inline for
diagnostic information and more (e.g. build errors, CSS color preview).
See `:help virtual-text` for more information.

The default color schemes (e.g. desert) are now fixed to look correct
again.

Misc options and commands:
- `set nosplitscroll` lets you preserve the windows' scroll positions
  when splitting. (v9.0.0445)
- `:defer` allows you to clean up in a function. (v9.0.0370)
- `:echowindow` allows you to echo a message to a floating popup message
  window instead of to the command line. (v9.0.0321)

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

- Fixed non-native full screen not working well with the notch on newer
  MacBook's when set to not show menu bar. You can also use
  `MMNonNativeFullScreenSafeAreaBehavior` to force MacVim to use the
  notch area as well if you don't mind some content being obscured. #1261
- Fixed bad interaction when two settings ("Open untitled window: never"
  and "After last window closes: Quit MacVim") are set together. #1257
- Fixed the bundled Vim tutor not working when launching from the Help
  menu #1265.
- Fix crashing on launch under macOS 10.9. #1212
- Fixed potential crash when switching appearance mode in MacVim
  preferences. #1270
- Korean localized menus no longer throw a syntax error on launch. #1278
- `did_install_default_menus` should work in MacVim now. #1267

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

Sparkle (updater for MacVim) is now updated to 1.27.1 (#1284), and we no
longer use DSA keys for signing updates (#1285) as we are using EdDSA
already.

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

- Scripting languages versions:
    - Python is now built against 3.10, up from 3.9.

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

Requires macOS 10.9 or above.

Script interfaces have compatibility with these versions:

- Lua 5.4
- Perl 5.18
- Python2 2.7
- Python3 3.10
- Ruby 3.1
release-174
2022-09-15 11:56:17 -07:00
Yee Cheng Chin 4f8388f872 Merge remote-tracking branch 'vim/master' 2022-09-15 11:52:01 -07:00
Bram Moolenaar a4abe514ec patch 9.0.0472: virtual text "below" doesn't show in list mode
Problem:    Virtual text "below" doesn't show in list mode.
Solution:   Reset lcs_eol_one when displaying text property.
2022-09-15 19:44:09 +01:00
mityu 12167d8b84 patch 9.0.0471: no test for what patch 9.0.0469 fixes
Problem:    No test for what patch 9.0.0469 fixes.
Solution:   Add a test. (closes #11140)
2022-09-15 17:44:07 +01:00
Bram Moolenaar b46c083a5e patch 9.0.0470: in :def function all closures in loop get the same variables
Problem:    In a :def function all closures in a loop get the same variables.
Solution:   When in a loop and a closure refers to a variable declared in the
            loop, prepare for making a copy of variables for each closure.
2022-09-15 17:19:37 +01:00
Yee Cheng Chin d404ddd141 Merge remote-tracking branch 'vim/master' 2022-09-15 06:20:00 -07:00
Luuk van Baal 3735f11050 patch 9.0.0469: cursor moves if cmdwin is closed when 'splitscroll' is off
Problem:    Cursor moves if cmdwin is closed when 'splitscroll' is off.
Solution:   Skip win_fix_cursor if called when cmdwin is open or closing.
            (Luuk van Baal, closes #11134)
2022-09-15 12:43:26 +01:00
Bram Moolenaar aeef1f7f6d patch 9.0.0468: exectution stack underflow without the +eval feature
Problem:    Exectution stack underflow without the +eval feature. (Dominique
            Pellé)
Solution:   Add to execution stack without FEAT_EVAL. (closes #11135)
2022-09-15 12:20:18 +01:00
Yee Cheng Chin fa37c18c21 Merge pull request #1287 from ychin/support-strikethrough
Support strikethrough/underdouble/underdashed/underdotted styles
2022-09-14 21:07:14 -07:00
Yee Cheng Chin 882944f146 Support strikethrough/underdouble/underdashed/underdotted styles
Add support for all the missing text styles for MacVim for Vim parity.

For strikethrough, this needed to be done as a second pass to make sure
they get drawn on top of the text. This is necessary because currently
the logic buffers texts up before dispatching them later in a line, so
it's just easier to loop through the line a second time if we detected
strikethrough. For the strikethrough position, we simply use the half of
xheight which seems to work best in looking good.

For underdouble, the logic is a little tricky because sometimes we don't
have space below the line. When that's the case, simply draw the second
line on top of the first line.

For underdotted, need to do something smart to space out the dots. When
the width is divisible by 2, they get spaced out evenly. If they are
not, try to make it work if divisible by 3. If that's not the case, we
just readjust the size of dot/gap a little bit to make it fit, even
though now we have non-integer sizes (from experimentation, the
antialising works well enough that it's not too jarring).

Also fix rendering of undercurl to work for double-width characters as
well.

Note that underdouble/underdotted/underdashed are not supported in
regular gVim yet, and so I had to add the ifdef for those in gui.c.
These may cause merge conflicts later which should be easily resolved.

Known issue 1: Note that currently underline is not respecting the
font's underline thickness and position. We always use a thickness of 1
pt, and hard-code a 0.4*descent position, which are not great. Thickness
in particular should scale with the font size. They should be fixed in a
future commit.

Known issue 2: There are some current clipping bugs in the renderer.
This is because the line height returned by NSLayoutManager is sometimes
smaller than ascent+descent+leading, *and* MMCoreTextView for some
reason takes the `ceil(descent)` (presumably to make the rendering
grid-aligned). This should be fixed later.

Fix #1034
2022-09-14 20:09:11 -07:00
Bram Moolenaar d3922afbd6 patch 9.0.0467: build failure
Problem:    Build failure.
Solution:   Add missing change.
2022-09-14 22:30:59 +01:00
Bram Moolenaar ebd0e8bb85 patch 9.0.0466: virtual text wrong after adding line break after line
Problem:    Virtual text wrong after adding line break after line.
Solution:   Pass an "eol" flag to where text properties are adjusted.
            (closes #11131)
2022-09-14 22:13:59 +01:00
mityu e697d48890 patch 9.0.0465: cursor moves when cmdwin is closed when 'splitscroll' is off
Problem:    Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution:   Temporarily set 'splitscroll' when jumping back to the original
            window. (closes #11128)
2022-09-14 17:27:36 +01:00
Bram Moolenaar 702bd6c7c6 patch 9.0.0464: with virtual text "above" indenting doesn't work well
Problem:    With virtual text "above" indenting doesn't work well.
Solution:   Ignore text properties while adjusting indent. (issue #11084)
2022-09-14 16:09:57 +01:00
Dominique Pelle febe13892e patch 9.0.0463: command line test leaves directory behind
Problem:    Command line test leaves directory behind.
Solution:   Use the "R" flag on the first mkdir(). (Dominique Pellé,
            closes #11127)
2022-09-14 12:51:49 +01:00
Bram Moolenaar 98b373075e patch 9.0.0462: ASAN warning for integer overflow
Problem:    ASAN warning for integer overflow.
Solution:   Check for tp_col to be MAXCOL.
2022-09-14 12:06:53 +01:00
Yee Cheng Chin b3cd8a5c93 Merge pull request #1286 from ychin/fix-ci-vimtags-generation
Fix MacVim CI not re-generating help tags properly
2022-09-13 23:30:17 -07:00
Yee Cheng Chin c3c27f93ee Merge remote-tracking branch 'vim/master' 2022-09-13 21:11:40 -07:00
Luuk van Baal 470a14140b patch 9.0.0461: 'scroll' is not always updated
Problem:    'scroll' is not always updated.
Solution:   Call win_init_size() at the right place.
2022-09-14 01:27:23 +01:00
Bram Moolenaar 766ae5b252 patch 9.0.0460: loop variable can't be found
Problem:    Loop variable can't be found.
Solution:   Adjust block_id of the loop variable each round.
2022-09-14 00:30:51 +01:00
Bram Moolenaar 353b68a991 patch 9.0.0459: Vim9: block in for loop doesn't behave like a code block
Problem:    Vim9: block in for loop doesn't behave like a code block.
Solution:   Use a new block ID for each loop at the script level.
2022-09-13 21:10:45 +01:00
Bram Moolenaar 3b93cf218f patch 9.0.0458: splitting a line with a text prop "above" moves it down
Problem:    Splitting a line with a text prop "above" moves it to a new line
            below.
Solution:   Keep an "above" text prop above the first line.
2022-09-13 18:34:18 +01:00
Bram Moolenaar a04f457a6c patch 9.0.0457: substitute prompt does not highlight an empty match
Problem:    Substitute prompt does not highlight an empty match.
Solution:   Highlight at least one character.
2022-09-13 13:45:26 +01:00
Bram Moolenaar b1842de5ca patch 9.0.0456: function called at debug prompt is also debugged
Problem:    Function called at debug prompt is also debugged.
Solution:   Reset the debug level while entering the debug command.
            (closes #11118)
2022-09-13 12:36:57 +01:00
Luuk van Baal 5ed391708a patch 9.0.0455: a few problems with 'splitscroll'
Problem:    A few problems with 'splitscroll'.
Solution:   Fix 'splitscroll' problems. (Luuk van Baal, closes #11117)
2022-09-13 11:55:10 +01:00
Your Name 810cb5a3bf patch 9.0.0454: incorrect color for modeless selection with GTK
Problem:    Incorrect color for modeless selection with GTK.
Solution:   Use simple inversion instead of XOR. (closes #11111)
2022-09-13 11:25:54 +01:00
Yee Cheng Chin cc43421b76 Fix MacVim CI not re-generating help tags properly
We previously added a step to rebuild the Vim help tags when publishing
so that we could get the latest tags when generating a MacVim release
(sometimes Vim's runtime is lagging behind and doesn't have that done).

However, the step was so placed so far back (after building/testing)
that it doesn't actually do anything, as MacVim was already built. Move
it earlier so we build MacVim after vimtags are re-generated. As part of
doing this we also need to split building Vim itself earlier as vimtags
generation requires having a Vim binary.

So the updated steps are 1. Vim, 2. help tags, 3. MacVim, 4. Tests.
Previously they were 1. Vim/MacVim, 2. Tests, 3. help tags.
2022-09-12 15:47:29 -07:00
Yee Cheng Chin 08d6d4144d Remove stale dsa_pub.pem reference in Xcode project file 2022-09-12 15:28:05 -07:00
Bram Moolenaar 83a19c5fda patch 9.0.0453: on an AZERTY keyboard digit keys get the shift modifier
Problem:    On an AZERTY keyboard digit keys get the shift modifier.
Solution:   Remove the shift modifier from digit keys. (closes #11109)
2022-09-12 20:35:28 +01:00
Bram Moolenaar 6eda17d881 patch 9.0.0452: Visual highlighting extends into virtual text prop
Problem:    Visual highlighting extends into virtual text prop.
Solution:   Do not highlight what isn't actually selected.  Fix ordering of
            stored text props.
2022-09-12 19:25:11 +01:00
Bram Moolenaar c9dc03fff5 patch 9.0.0451: virtual text "above" does not work with 'nowrap'
Problem:    Virtual text "above" does not work with 'nowrap'.
Solution:   Do wrap the line after. (closes #11084)
2022-09-12 17:51:07 +01:00
Bram Moolenaar 7b2d87220c Add missing part of patch 2022-09-12 15:16:29 +01:00
zeertzjq cd2d5c181a patch 9.0.0450: return value of argument check functions is inconsistent
Problem:    Return value of argument check functions is inconsistent.
Solution:   Return OK/FAIL instead of TRUE/FALSE. (closes #11112)
2022-09-12 14:09:30 +01:00
zeertzjq cdc839353f patch 9.0.0449: there is no easy way to translate a key code into a string
Problem:    There is no easy way to translate a string with a key code into a
            readable string.
Solution:   Add the keytrans() function. (closes #11114)
2022-09-12 13:38:41 +01:00
ObserverOfTime 5a4eb55122 patch 9.0.0448: SubRip files are not recognized
Problem:    SubRip files are not recognized.
Solution:   Add a pattern for SubRip. (closes #11113)
2022-09-12 12:43:23 +01:00
Yee Cheng Chin 8e770ba27b Merge pull request #1285 from ychin/remove-sparkle-dsa-key
Remove DSA key for Sparkle updates
2022-09-12 04:31:40 -04:00
Yee Cheng Chin 55837e126f Merge pull request #1284 from ychin/sparkle-1.27.1
Sparkle 1.27.1
2022-09-12 04:31:17 -04:00
Yee Cheng Chin 73f260832e Merge remote-tracking branch 'vim/master' 2022-09-12 01:01:41 -07:00
Yee Cheng Chin 5dece184bf Remove DSA key for Sparkle updates
Sparkle has deprecated signing updates with DSA for a long time. MacVim
has also added an EdDSA key for a while now. This means we can remove
the DSA key and still be pretty safe and certain that vast majority of
MacVim users can still update from old versions of MacVim to the new
one, using only the EdDSA key. This makes the update process easier and
we don't have to use legacy tools to sign each update with the
deprecated DSA key.
2022-09-12 00:49:42 -07:00
Yee Cheng Chin 2b050f9952 Sparkle 1.27.1
This is the last 1.x version. Upgrading to it to get all remaining fixes
before we need to decide whether whether we upgrade to 2.x (which has
much higher minimum macOS requirements).
2022-09-12 00:45:04 -07:00
Yee Cheng Chin 515274be49 Merge pull request #1283 from ychin/python3-detection-use-3.10
Update Python vimrc detection to 3.10
2022-09-11 23:54:18 -04:00
Yee Cheng Chin 5cf6e35a96 Update Python vimrc detection to 3.10
CI build has been updated to build MacVim against Python 3.10, so we
want to update the other detection to use 3.10 as well. Also added a
comment to CI file to make sure we remember to update the vimrc file
when updating the version.
2022-09-11 19:46:21 -07:00
Yee Cheng Chin 787158fa36 Merge pull request #1280 from ychin/cmdline-align-bottom-of-window
Allow pinning the cmdline to be aligned to the bottom of window
2022-09-11 20:30:03 -04:00
Yee Cheng Chin 7b81cc3922 Allow pinning the cmdline to be aligned to the bottom of window
Add a setting that could pin the command-line portion of Vim to the
bottom of the MacVim window. This is useful when smooth resizing is set,
guioption+=k, or in full screen. In those situations, the MacVim window
size is usually not direct multiples of the Vim text sizes. Previously
the command-line would be drawn like other texts, and hence not aligned
to the bottom and hence looking aesthetically a little off.

When this setting is set, the command-line portion would be aligned to
the bottom of the window. This essentially moves the gap (due to the
extra height of the window) from the bottom to be between cmdline and
the rest of Vim. When cmdheight is changed, or other situations (e.g.
typing too much cmdline height to be increased), the gap will be
adjusted as well.

Implementation-wise, this was done by passing the `commandline_row` var
from Vim to MacVim, which serves as a good estimate of where the
command-line is. This works better than just using the `cmdheight`
option as it is closer to the current state of the cmdline. One issue is
that in hit-enter prompts, the row is set to the 2nd to last row to
anticipate more messages, and we just add a big hack by incrementing the
row by 1 in hit-enter state so only the "Press Enter..." part is aligned
to bottom. We also have to do something similar to when it's showing
"--more--" for similar reasons.

- An alternative would have been to modify Vim to provide us the
  information we want (the number of rows below the status line) but
  it's pretty tricky to do as cmdline_row is used in lots of places.
  It's easier / simpler to do a simple hack like this to localize the
  damage.

Close #833
2022-09-11 17:27:28 -07:00
Yee Cheng Chin ad721aa587 Merge pull request #1282 from ychin/fix-preference-resizing-when-sparkle-disabled
Fix broken preference pane sizing when sparkle disabled
2022-09-11 18:22:06 -04:00
Yee Cheng Chin 4a2f851130 Fix broken preference pane sizing when sparkle disabled
The recent change that added smooth resizing changed the alignment for
the General preference pane from bottom to top aligned as it never made
sense to be bottom aligned. However, there was code in in the preference
controller to correct for that when resizing the pane when sparkle is
disabled, which caused the resizing to not work. Fix that to account for
the top alignment instead of bottom.

Fix #1281
2022-09-11 15:08:51 -07:00
Bram Moolenaar cf0995d7d7 patch 9.0.0447: using :echowin while at the hit-enter prompt causes problems
Problem:    Using :echowin while at the hit-enter prompt causes problems.
Solution:   Do not prompt for :echowin.  Postpone showing the message window.
            Start the timer when the window is displayed.
2022-09-11 21:36:17 +01:00
Bram Moolenaar 87e74d0e03 patch 9.0.0446: message window may be positioned too low
Problem:    Message window may be positioned too low.
Solution:   Compute cmdline_row before computing the position.
2022-09-11 20:12:15 +01:00
Luuk van Baal 29ab524358 patch 9.0.0445: when opening/closing window text moves up/down
Problem:    When opening/closing window text moves up/down.
Solution:   Add the 'splitscroll' option.  When off text will keep its
            position as much as possible.
2022-09-11 16:59:53 +01:00
Bram Moolenaar 9510d22463 patch 9.0.0444: trying to declare g:variable gives confusing error
Problem:    Trying to declare g:variable gives confusing error.
Solution:   Give a better error message. (closes #11108)
2022-09-11 15:14:05 +01:00