Compare commits

...

116 Commits

Author SHA1 Message Date
Yee Cheng Chin 69617312ea MacVim Snapshot 171
Updated to Vim 8.2.2681.

This is a small update mostly containing a fix to rendering bug in Core
Text renderer.

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

- Fixed a rendering issue where MacVim would stop drawing text when the
  computer is running low on memory. Previously the user would have to
  restart MacVim in order to get the rendering back. #1164

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.9
- Ruby 3.0
2021-04-01 01:32:44 -07:00
Yee Cheng Chin de249a80fe Merge remote-tracking branch 'vim/master' 2021-03-31 21:19:49 -07:00
Yee Cheng Chin a73703f538 Merge pull request #1178 from ichizok/fix/xcodeproj
Update Xcode project
2021-03-31 21:03:27 -07:00
Bram Moolenaar 12be734faf patch 8.2.2681: Vim9: test fails for redeclaring script variable
Problem:    Vim9: test fails for redeclaring script variable.
Solution:   It's OK to assign to an existing script variable in legacy.
2021-03-31 21:47:33 +02:00
Bram Moolenaar e535db86e7 patch 8.2.2680: Vim9: problem defining a script variable from legacy function
Problem:    Vim9: problem defining a script variable from legacy function.
Solution:   Check if the script is Vim9, not the current syntax.
            (closes #8032)
2021-03-31 21:07:24 +02:00
Bram Moolenaar dad4473f02 Update runtime files. 2021-03-31 20:07:33 +02:00
Bram Moolenaar ae0f151ddf patch 8.2.2679: status line missing for non-current window with winbar
Problem:    Winbar drawn over status line for non-current window with winbar
            if frame is zero height. (Leonid V. Fedorenchik)
Solution:   Do not draw the window if the frame height is zero. (closes #8037)
2021-03-30 22:12:12 +02:00
Bram Moolenaar 82820d9bf1 patch 8.2.2678: test for 'autoshelldir' does not reset the option
Problem:    Test for 'autoshelldir' does not reset the option.
Solution:   Reset the option after testing.
2021-03-30 20:54:28 +02:00
Bram Moolenaar 38a3bfa9a2 patch 8.2.2677: Vim9: cannot use only some of the default arguments
Problem:    Vim9: cannot use only some of the default arguments.
Solution:   Use v:none to use default argument value.  Remove
            uf_def_arg_idx[], use JUMP_IF_ARG_SET. (closes #6504)
2021-03-29 22:14:55 +02:00
Bram Moolenaar 9ea7e55ab9 patch 8.2.2676: missing error message
Problem:    Missing error message.
Solution:   Add new error message.
2021-03-29 21:06:04 +02:00
Bram Moolenaar 8b9abfd86c patch 8.2.2675: directory change in a terminal window shell is not followed
Problem:    Directory change in a terminal window shell is not followed.
Solution:   Add the 'autoshelldir' option. (closes #6290)
2021-03-29 20:49:05 +02:00
Bram Moolenaar 9dbe701fe1 patch 8.2.2674: Motif: cancelling the font dialog resets the font
Problem:    Motif: cancelling the font dialog resets the font.
Solution:   When no font is selected to not change the font. (closes #7825,
            closes #8035)  Fix compiler warnings.
2021-03-29 20:10:26 +02:00
Bram Moolenaar 3215466af9 patch 8.2.2673: Vim9: script-local funcref can have lower case name
Problem:    Vim9: script-local funcref can have lower case name.
Solution:   Require an upper case name.
2021-03-28 21:14:06 +02:00
Bram Moolenaar b2cb6c8bbd patch 8.2.2672: Vim9: cannot use :lockvar and :unlockvar in compiled script
Problem:    Vim9: cannot use :lockvar and :unlockvar in compiled script.
Solution:   Implement locking support.
2021-03-28 20:38:34 +02:00
Bram Moolenaar f6bdd82c7e patch 8.2.2671: error for line number in legacy script
Problem:    Error for line number in legacy script.
Solution:   Check for number type.
2021-03-28 16:26:41 +02:00
Bram Moolenaar b2ac7d0663 patch 8.2.2670: Vim9: error for append(0, text)
Problem:    Vim9: error for append(0, text).
Solution:   Check for negative number. (closes #8022)
2021-03-28 15:46:16 +02:00
Bram Moolenaar df749a2b9c patch 8.2.2669: command line completion does not work after "vim9"
Problem:    Command line completion does not work after "vim9".
Solution:   Include the "9". (Naohiro Ono, closes #8025)
2021-03-28 15:29:43 +02:00
ichizok 7d55a41026 Merge remote-tracking branch 'vim/master' 2021-03-28 21:16:37 +09:00
Bram Moolenaar f49a1fcdb9 patch 8.2.2668: Vim9: omitting "call" for "confirm()" does not give an error
Problem:    Vim9: omitting "call" for "confirm()" does not give an error.
Solution:   Do not recognize a modifier followed by "(".
2021-03-27 22:20:21 +01:00
Bram Moolenaar 24f21fdfca patch 8.2.2667: prop_find() cannot find item matching both id and type
Problem:    prop_find() cannot find item matching both id and type.
Solution:   Add the "both" argument. (Naohiro Ono, closes #8019)
2021-03-27 22:07:29 +01:00
Bram Moolenaar c580943965 patch 8.2.2666: Vim9: not enough function arguments checked for string
Problem:    Vim9: not enough function arguments checked for string.
Solution:   Check in ch_logfile(), char2nr() and others.
2021-03-27 21:23:30 +01:00
Bram Moolenaar 7b45d46cf7 patch 8.2.2665: test failures
Problem:    Test failures.
Solution:   Check more specific feature.  Add missing change.
2021-03-27 19:09:02 +01:00
Bram Moolenaar 32105ae88f patch 8.2.2664: Vim9: not enough function arguments checked for string
Problem:    Vim9: not enough function arguments checked for string.
Solution:   Check in balloon functions.  Refactor function arguments.
2021-03-27 18:59:25 +01:00
Bram Moolenaar 79efa2e3b3 patch 8.2.2663: Vim9: leaking memory when inline function has an error
Problem:    Vim9: leaking memory when inline function has an error.
Solution:   Free the partially allocated function.
2021-03-27 15:40:11 +01:00
Bram Moolenaar 7007e31bde patch 8.2.2662: there is no way to avoid some escape sequences
Problem:    There is no way to avoid some escape sequences.
Solution:   Suppress escape sequences when the --not-a-term argument is used.
            (Gary Johnson)
2021-03-27 12:11:33 +01:00
Bram Moolenaar bb5d87c850 patch 8.2.2661: leaking memory when looping over a string
Problem:    Leaking memory when looping over a string.
Solution:   Free the memory.
2021-03-26 22:15:26 +01:00
Bram Moolenaar ccc25aa285 patch 8.2.2660: Vim9: no error for declaration with trailing text
Problem:    Vim9: no error for declaration with trailing text.
Solution:   Give an error. (closes #8014)
2021-03-26 21:27:52 +01:00
Bram Moolenaar c61cb8bfe1 patch 8.2.2659: eval test fails because for loop on string works
Problem:    Eval test fails because for loop on string works.
Solution:   Check looping over function reference fails.
2021-03-26 20:56:45 +01:00
Bram Moolenaar 74e54fcb44 patch 8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
2021-03-26 20:41:29 +01:00
Bram Moolenaar 522eefd9a2 patch 8.2.2657: Vim9: error message for declaring variable in for loop
Problem:    Vim9: error message for declaring variable in for loop.
Solution:   Clear variables when entering block again. (closes #8012)
2021-03-26 18:49:22 +01:00
Bram Moolenaar a2b3e7dc92 patch 8.2.2656: some command line arguments and regexp errors not tested
Problem:    Some command line arguments and regexp errors not tested.
Solution:   Add a few test cases. (Dominique Pellé, closes #8013)
2021-03-26 17:24:34 +01:00
Bram Moolenaar 0a1a6a1aa4 patch 8.2.2655: The -w command line argument doesn't work
Problem:    The -w command line argument doesn't work.
Solution:   Don't set 'window' when set with the -w argument. (closes #8011)
2021-03-26 14:14:18 +01:00
Bram Moolenaar ff87140046 patch 8.2.2654: Vim9: getting a character from a string can be slow
Problem:    Vim9: getting a character from a string can be slow.
Solution:   Avoid a function call to get the character byte size. (#8000)
2021-03-26 13:34:05 +01:00
Bram Moolenaar 3a0f092ac0 patch 8.2.2653: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2021-03-25 22:22:30 +01:00
Bram Moolenaar fa984418e7 patch 8.2.2652: Vim9: can use command modifier without an effect
Problem:    Vim9: can use command modifier without an effect.
Solution:   Give an error for a misplaced command modifier.  Fix error message
            number.
2021-03-25 22:15:28 +01:00
Bram Moolenaar a91a71322d patch 8.2.2651: Vim9: restoring command modifiers happens after jump
Problem:    Vim9: restoring command modifiers happens after jump.
Solution:   Move the restore instruction to before the jump. (closes #8006)
            Also handle for and while.
2021-03-25 21:12:15 +01:00
ichizok 113f39a362 Update Xcode project
- Organize Vim sources
- Enable Base Internationalization
- Set "ALWAYS_SEARCH_USER_PATHS" to NO
2021-03-25 18:21:47 +09:00
Yee Cheng Chin ef048edbb7 Merge pull request #1179 from s4y/fix-1164
Don't rely on NSCache to retain newly-created lines.
2021-03-24 16:12:12 -07:00
Bram Moolenaar 2fecb53115 patch 8.2.2650: Vim9: command modifiers not handled in nested function
Problem:    Vim9: command modifiers not handled in nested function.
Solution:   Keep function-local info in a structure and save it on the stack.
2021-03-24 22:00:56 +01:00
Bram Moolenaar 1ff89deeaa patch 8.2.2649: Vim9: some wincmd arguments cause a white space error
Problem:    Vim9: some wincmd arguments cause a white space error.
Solution:   Insert a space before the count. (closes #8001)
2021-03-24 20:08:12 +01:00
Sidney San Martín 21a6fbaeb5 Don't rely on NSCache to retain newly-created lines.
When there's memory pressure, the cache just drops the line immediately.
Fixes #1164.
2021-03-24 11:43:48 -04:00
Bram Moolenaar c54f347d63 patch 8.2.2648: terminal resize test sometimes hangs
Problem:    Terminal resize test sometimes hangs.
Solution:   Wait for the shell to display a prompt and other output.
2021-03-23 19:22:12 +01:00
Bram Moolenaar f4a2ed0714 patch 8.2.2647: terminal test sometimes hangs
Problem:    Terminal test sometimes hangs.
Solution:   Wait for the shell to display a prompt.
2021-03-23 16:25:09 +01:00
ichizok 34531670a2 Merge remote-tracking branch 'vim/master' 2021-03-23 20:46:05 +09:00
Bram Moolenaar f28f2ac425 patch 8.2.2646: Vim9: error for not using string doesn't mentionargument
Problem:    Vim9: error for not using string doesn't mention argument.
Solution:   Add argument number.
2021-03-22 22:21:26 +01:00
Bram Moolenaar 49f1e9ec3e patch 8.2.2645: using inline function is not properly tested
Problem:    Using inline function is not properly tested.
Solution:   Add test cases, esp. for errors.  Minor code improvements.
2021-03-22 20:49:02 +01:00
Bram Moolenaar da1dbed0df patch 8.2.2644: prop_clear() causes a screen update even when nothing changed
Problem:    prop_clear() causes a screen update even when nothing changed.
Solution:   Only redraw when a property was cleared. (Dominique Pellé)
2021-03-22 19:43:34 +01:00
Bram Moolenaar 1f448d906b patch 8.2.2643: various code not covered by tests
Problem:    Various code not covered by tests.
Solution:   Add a few more test. (Yegappan Lakshmanan, closes #7995)
2021-03-22 19:37:06 +01:00
Bram Moolenaar e98f60a591 patch 8.2.2642: Vim9: no clear error for wrong inline function
Problem:    Vim9: no clear error for wrong inline function.
Solution:   Check for something following the "{".
2021-03-22 18:22:30 +01:00
Bram Moolenaar 2cec027af4 patch 8.2.2641: display test fails because of lacking redraw
Problem:    Display test fails because of lacking redraw.
Solution:   Add a redraw command.
2021-03-22 17:30:47 +01:00
Bram Moolenaar f1387285e2 patch 8.2.2640: screenstring() returns non-existing composing characters
Problem:    screenstring() returns non-existing composing characters.
Solution:   Only use composing characters if there is a base character.
2021-03-22 17:11:15 +01:00
Bram Moolenaar 5ea79a2599 patch 8.2.2639: build failure when fsync() is not available
Problem:    Build failure when fsync() is not available.
Solution:   Add #ifdef.
2021-03-22 16:45:35 +01:00
Bram Moolenaar 4c86830fc5 patch 8.2.2638: cannot write a message to the terminal from the GUI
Problem:    Cannot write a message to the terminal from the GUI.
Solution:   Add :echoconsole and use it in the test runner. (issue #7975)
2021-03-22 16:19:45 +01:00
Bram Moolenaar 09f8b3a022 patch 8.2.2637: prop_remove() causes a redraw even when nothing changed
Problem:    prop_remove() causes a redraw even when nothing changed.
Solution:   Only redraw if a property was removed.
2021-03-21 22:29:54 +01:00
Bram Moolenaar 67da21a147 patch 8.2.2636: memory leak when compiling inline function
Problem:    Memory leak when compiling inline function.
Solution:   Free the prefetched line.
2021-03-21 22:12:34 +01:00
Bram Moolenaar 7a6eaa06f9 patch 8.2.2635: Vim9: cannot define an inline function
Problem:    Vim9: cannot define an inline function.
Solution:   Make an inline function mostly work.
2021-03-21 20:53:29 +01:00
Bram Moolenaar f90c855c71 patch 8.2.2634: 'tagfunc' does not indicate using a pattern
Problem:    'tagfunc' does not indicate using a pattern.
Solution:   Add the "r" flag. (Andy Massimino, closes #7982)
2021-03-21 14:49:57 +01:00
Bram Moolenaar 196a1f7409 patch 8.2.2633: multi-byte 'fillchars' for folding do not show properly
Problem:    Multi-byte 'fillchars' for folding do not show properly.
Solution:   Handle multi-byte characters correctly. (Yegappan Lakshmanan,
            closes #7983, closes #7955)
2021-03-21 14:39:19 +01:00
Bram Moolenaar c5cf369e95 patch 8.2.2632: not all command line arguments are tested
Problem:    Not all command line arguments are tested.
Solution:   Add tests for -D and -serverlist. (Dominique Pellé, closes #7992)
2021-03-20 22:16:56 +01:00
Bram Moolenaar a0c8aea479 patch 8.2.2631: commands from winrestcmd() do not always work properly
Problem:    Commands from winrestcmd() do not always work properly. (Leonid V.
            Fedorenchik)
Solution:   Repeat the size commands twice. (closes #7988)
2021-03-20 19:55:35 +01:00
Bram Moolenaar 592f57f5fe patch 8.2.2630: hard to see where a test gets stuck
Problem:    Hard to see where a test gets stuck.
Solution:   Print the executed test function. (Dominique Pellé, closes #7975)
2021-03-20 16:44:25 +01:00
Bram Moolenaar a0399efa72 patch 8.2.2629: Vim9: error for #{{ is not desired
Problem:    Vim9: error for #{{ is not desired.
Solution:   Adjust the checks. (closes #7990)
2021-03-20 15:00:01 +01:00
Bram Moolenaar 5c7a299c16 patch 8.2.2628: Vim9: #{ can still be used at the script level
Problem:    Vim9: #{ can still be used at the script level.
Solution:   Give an error for #{ like in a :def function.
2021-03-20 13:29:38 +01:00
Bram Moolenaar 4355894869 patch 8.2.2627: no need to check for BSD after checking for not root
Problem:    No need to check for BSD after checking for not root.
Solution:   Remove CheckNotBSD. (Ozaki Kiichi, closes #7989)
2021-03-20 12:49:15 +01:00
Bram Moolenaar 240014321b patch 8.2.2626: GTK3: error when starting up and -geometry is given
Problem:    GTK3: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes #7978)
2021-03-20 12:36:46 +01:00
Bram Moolenaar af125866db patch 8.2.2625: rss files not recognized
Problem:    Rss files not recognized.
Solution:   Recognize .rss as XML. (Kivin Locke, closes #7987)
2021-03-19 20:27:40 +01:00
Bram Moolenaar 74b99f6ab6 patch 8.2.2624: atom files not recognized
Problem:    Atom files not recognized.
Solution:   Recognize .atom as XML. (Kivin Locke, closes #7986)
2021-03-19 20:19:12 +01:00
Bram Moolenaar 17709e280a patch 8.2.2623: some tests fail when run as root
Problem:    Some tests fail when run as root.
Solution:   Use CheckNotRoot.
2021-03-19 14:38:12 +01:00
Bram Moolenaar a555e6fcb6 patch 8.2.2622: GTK: error when starting up and -geometry is given
Problem:    GTK: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes #7978)
2021-03-18 22:28:57 +01:00
Bram Moolenaar 108cf0153c patch 8.2.2621: typval2type() cannot handle recursive structures
Problem:    typval2type() cannot handle recursive structures.
Solution:   Use copyID. (closes #7979)
2021-03-18 22:15:04 +01:00
Bram Moolenaar 4b3e1964d8 patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
Problem:    Vim9: Using #{ for a dictionary gives strange errors.
Solution:   Give an error when using #{ for a comment after a command.
2021-03-18 21:37:55 +01:00
ichizok c877592fef Merge remote-tracking branch 'vim/master' 2021-03-18 09:07:25 +09:00
Bram Moolenaar 5f91e74bf9 patch 8.2.2619: Vim9: no test for return type of lambda
Problem:    Vim9: no test for return type of lambda.
Solution:   Add a test.
2021-03-17 21:29:29 +01:00
Bram Moolenaar 3f32788000 patch 8.2.2618: Vim9: cannot use a normal list name to store function refs
Problem:    Vim9: cannot use a normal list name to store function refs.
Solution:   Allow a lower case name if it is indexed.
2021-03-17 20:56:38 +01:00
Bram Moolenaar 8863bda25d patch 8.2.2617: Vim9: script variable in block not found by function
Problem:    Vim9: script variable in a block scope not found by a nested
            function.
Solution:   Copy the block scope IDs before compiling the function.
2021-03-17 18:42:08 +01:00
Bram Moolenaar 3e1916947d patch 8.2.2616: Vim9: if 'cpo' is change in Vim9 script it may be restored
Problem:    Vim9: if 'cpo' is change in Vim9 script it may be restored.
Solution:   Apply the changes to 'cpo' to the restored value.
2021-03-17 17:46:00 +01:00
Bram Moolenaar a4c81bea38 patch 8.2.2615: test is sourcing the wrong file
Problem:    Test is sourcing the wrong file.
Solution:   Correct the file name.
2021-03-17 15:23:16 +01:00
Bram Moolenaar c970e4225b patch 8.2.2614: Vim9: function is deleted while executing
Problem:    Vim9: function is deleted while executing.
Solution:   increment the call count, when more than zero do not delete the
            function but mark it as dead. (closes #7977)
2021-03-17 15:03:04 +01:00
Bram Moolenaar 6ccfd99b92 patch 8.2.2613: new test throws exception
Problem:    New test throws exception.
Solution:   Adjust the function cleanup.
2021-03-17 13:39:33 +01:00
Bram Moolenaar 18b7d86d7f patch 8.2.2612: col('.') may get outdated column value
Problem:    col('.') may get outdated column value.
Solution:   Add a note to the help how to make this work and add a test for
            it. (closes #7971)
2021-03-17 13:28:05 +01:00
Bram Moolenaar f8c52e8d08 patch 8.2.2611: conditions for startup tests are not exactly right
Problem:    Conditions for startup tests are not exactly right.
Solution:   Check for type of GUI instead of MS-Windows. (Ozaki Kiichi,
            closes #7976)
2021-03-17 12:27:23 +01:00
Bram Moolenaar 1e448465e1 patch 8.2.2610: mouse click test fails when using remote connection
Problem:    Mouse click test fails when using remote connection.
Solution:   Use a larger 'mousetime'. (Dominique Pellé, closes #7968)
2021-03-16 21:17:16 +01:00
Bram Moolenaar 3214812997 patch 8.2.2609: test disabled on MS-Windows even though it should work
Problem:    Test disabled on MS-Windows even though it should work.
Solution:   Restore the condition for skipping the test. (Ken Takata,
            closes #7970)
2021-03-16 13:23:30 +01:00
Bram Moolenaar f4fcedc59d patch 8.2.2608: character input not fully tested
Problem:    Character input not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #7963)
2021-03-15 18:36:20 +01:00
Bram Moolenaar 02b4d9b18a patch 8.2.2607: strcharpart() cannot include composing characters
Problem:    strcharpart() cannot include composing characters.
Solution:   Add the {skipcc} argument.
2021-03-14 19:46:45 +01:00
Bram Moolenaar 70ce8a1561 patch 8.2.2606: strchars() defaults to counting composing characters
Problem:    strchars() defaults to counting composing characters.
Solution:   Add strcharlen() which ignores composing characters.
2021-03-14 19:02:09 +01:00
Bram Moolenaar 0289a093a4 patch 8.2.2605: Vim9: string index and slice does not include composing chars
Problem:    Vim9: string index and slice does not include composing chars.
Solution:   Include composing characters. (issue #6563)
2021-03-14 18:40:19 +01:00
Bram Moolenaar 240309c9bf patch 8.2.2604: GUI-specific command line arguments not tested
Problem:    GUI-specific command line arguments not tested.
Solution:   Add tests for several arguments. (Dominique Pellé, closes #7962)
2021-03-14 16:20:37 +01:00
Bram Moolenaar 77b10ffad4 patch 8.2.2603: Vim9: no effect if user command is also a function
Problem:    Vim9: no effect if user command is also a function.
Solution:   Check for paren following. (closes #7960)
2021-03-14 13:21:35 +01:00
Bram Moolenaar 2e34c34be1 patch 8.2.2602: Vim9: continue doesn't work if :while is very first command
Problem:    Vim9: continue doesn't work if :while is very first command.
            (Yegappan Lakshmanan)
Solution:   Add one to the continue instruction index.
2021-03-14 12:13:33 +01:00
Bram Moolenaar 6bce5856b5 patch 8.2.2601: memory usage test often fails on FreeBSD
Problem:    Memory usage test often fails on FreeBSD.
Solution:   Increase multiplier for upper limit.
2021-03-13 22:11:51 +01:00
Bram Moolenaar 93e1cae739 patch 8.2.2600: Vim9: crash when putting an unknown type in a dictionary
Problem:    Vim9: crash when putting an unknown type in a dictionary.
            (Yegappan Lakshmanan)
Solution:   Handle a NULL type pointer.
2021-03-13 21:24:56 +01:00
Bram Moolenaar edba70703b patch 8.2.2599: build failure
Problem:    Build failure.
Solution:   Add missing change.
2021-03-13 21:14:18 +01:00
Bram Moolenaar 6508880d6c patch 8.2.2598: Vim9: :open does not need to be supported
Problem:    Vim9: :open does not need to be supported.
Solution:   Do not support :open in Vim9 script.
2021-03-13 21:07:21 +01:00
Bram Moolenaar cb4e80fab9 patch 8.2.2597: Vim9: "import * as" does not work at script level
Problem:    Vim9: "import * as" does not work at script level.
Solution:   Implement using an imported namespace.
2021-03-13 20:57:19 +01:00
Bram Moolenaar 41cd80335c patch 8.2.2596: :doautocmd may confuse scripts listening to WinEnter
Problem:    :doautocmd may confuse scripts listening to WinEnter.
Solution:   Do the current buffer last. (closes #7958)
2021-03-13 15:47:56 +01:00
Bram Moolenaar 9e813b3dea patch 8.2.2595: setting 'winminheight' may cause 'lines' to change
Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (#7899)
2021-03-13 14:29:05 +01:00
Bram Moolenaar 0756f757ed patch 8.2.2594: alternate buffer added to session file even when it's hidden
Problem:    Alternate buffer added to session file even when it's hidden.
Solution:   Check the 'buflisted' option. (closes #7951)
2021-03-13 13:52:33 +01:00
Bram Moolenaar 0de8e2d6a3 patch 8.2.2593: list of distributed files is incomplete
Problem:    List of distributed files is incomplete.
Solution:   Add a file and rename another.
2021-03-13 13:30:03 +01:00
Bram Moolenaar c8cdf0f80b Update runtime files. 2021-03-13 13:28:13 +01:00
Bram Moolenaar 6fd367a97c patch 8.2.2592: code coverage could be improved
Problem:    Code coverage could be improved.
Solution:   Add a few more tests. (Dominique Pellé, closes #7957)
2021-03-13 13:14:04 +01:00
Bram Moolenaar c80f647512 patch 8.2.2591: Poke files are not recognized
Problem:    Poke files are not recognized.
Solution:   Add a filetype entry. (Matt Ihlenfield)
2021-03-12 22:16:41 +01:00
Bram Moolenaar 12bce95887 patch 8.2.2590: Vim9: default argument value may cause internal error
Problem:    Vim9: default argument value may cause internal error.
Solution:   Hide later function arguments when compiling the expression.
            (closes #7948)
2021-03-11 20:04:04 +01:00
Bram Moolenaar 776b954622 patch 8.2.2589: recover test hangs in the GUI
Problem:    Recover test hangs in the GUI.
Solution:   Add g:skipped_reason to skip a _nocatch_ test.
2021-03-10 22:27:48 +01:00
Bram Moolenaar 23b32a8d6b patch 8.2.2588: build failure with tiny features
Problem:    Build failure with tiny features.
Solution:   Add #ifdef.  Run recover test separately.
2021-03-10 21:55:46 +01:00
Bram Moolenaar 6635ae1437 patch 8.2.2587: recover test fails on FreeBSD
Problem:    Recover test fails on FreeBSD.
Solution:   Check for Linux.
2021-03-10 21:46:39 +01:00
Bram Moolenaar f52f0606ed patch 8.2.2586: process id may be invalid
Problem:    Process id may be invalid.
Solution:   Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
            van der Sanden, closes #7947)
2021-03-10 21:26:37 +01:00
Bram Moolenaar c23555de34 patch 8.2.2585: Vim9: illegal memory access
Problem:    Vim9: illegal memory access.
Solution:   Check byte right after "null", not one more.
2021-03-10 19:04:07 +01:00
Bram Moolenaar d345fb9216 patch 8.2.2584: Vim9: type error for assigning "any" to a list
Problem:    Vim9: type error for assigning the result of list concatenation to
            a list.
Solution:   Do not consider concatenation result in a constant. (closes #7942)
2021-03-10 18:43:09 +01:00
Bram Moolenaar 7ad67d1150 patch 8.2.2583: Vim9: cannot compare result of getenv() with null
Problem:    Vim9: cannot compare result of getenv() with null.
Solution:   Make the return type of getenv() "any". (closes #7943)
2021-03-10 16:08:26 +01:00
Bram Moolenaar ffb7dcdb77 patch 8.2.2582: Vim9: screendump test fails on MS-Windows
Problem:    Vim9: screendump test fails on MS-Windows.
Solution:   Use :function instead of :def.
2021-03-10 14:00:18 +01:00
Bram Moolenaar 37294bd6a2 patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redraw
Problem:    Vim9: sourcing Vim9 script triggers a redraw.
Solution:   Do not let setting/restoring 'cpoptions' cause a redraw.
            (closes #7920)
2021-03-10 13:40:08 +01:00
Bram Moolenaar e3ffcd9902 patch 8.2.2580: Vim9: checking vararg type may be wrong
Problem:    Vim9: checking vararg type is wrong when function is auto-loaded.
Solution:   Use the member type. (closes #7933)
2021-03-08 21:47:13 +01:00
Bram Moolenaar d00a7fb81a patch 8.2.2579: Vim9: crash in garbagecollect after for loop
Problem:    Vim9: crash in garbagecollect after for loop.
Solution:   Do not set a reference in script item when the name was cleared.
            (closes #7935)
2021-03-08 20:47:14 +01:00
Bram Moolenaar 86c3a2162c patch 8.2.2578: Lua cannot handle a passed in lambda
Problem:    Lua cannot handle a passed in lambda.
Solution:   Handle VAR_PARTIAL. (Prabir Shrestha, closes #7937, closes #7936)
2021-03-08 19:50:24 +01:00
Bram Moolenaar 9355ae4149 patch 8.2.2577: compiler warning for type conversion
Problem:    Compiler warning for type conversion.
Solution:   Add a typecast. (Mike Williams)
2021-03-08 19:04:05 +01:00
166 changed files with 4814 additions and 1440 deletions
+5 -1
View File
@@ -142,6 +142,7 @@ runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dcl.vim @cecamp
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/doxygen.vim @frogonwheels
runtime/syntax/dtd.vim @chrisbra
runtime/syntax/elmfilt.vim @cecamp
@@ -152,6 +153,7 @@ runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/gprof.vim @dpelle
runtime/syntax/groff.vim @jmarshall
runtime/syntax/haml.vim @tpope
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
@@ -162,10 +164,10 @@ runtime/syntax/lisp.vim @cecamp
runtime/syntax/lynx.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
runtime/syntax/make.vim @rohieb
runtime/syntax/make.vim @rohieb
runtime/syntax/maple.vim @cecamp
runtime/syntax/markdown.vim @tpope
runtime/syntax/netrw.vim @cecamp
runtime/syntax/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/pdf.vim @tpope
runtime/syntax/php.vim @TysonAndre
@@ -180,7 +182,9 @@ runtime/syntax/sh.vim @cecamp
runtime/syntax/sm.vim @cecamp
runtime/syntax/spec.vim @ignatenkobrain
runtime/syntax/sqloracle.vim @chrisbra
runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/tags.vim @cecamp
runtime/syntax/teraterm.vim @k-takata
runtime/syntax/tex.vim @cecamp
+2 -1
View File
@@ -13,7 +13,8 @@ SRC_ALL = \
.hgignore \
.lgtm.yml \
.travis.yml \
appveyor.yml \
.appveyor.yml \
.codecov.yml \
ci/appveyor.bat \
ci/build-snd-dummy.sh \
ci/config.mk*.sed \
+6 -4
View File
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
*autocmd.txt* For Vim version 8.2. Last change: 2021 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1526,9 +1526,11 @@ option will not cause any commands to be executed.
*:doautoa* *:doautoall*
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
Like ":doautocmd", but apply the autocommands to each
loaded buffer. Note that [fname] is used to select
the autocommands, not the buffers to which they are
applied.
loaded buffer. The current buffer is done last.
Note that [fname] is used to select the autocommands,
not the buffers to which they are applied.
Careful: Don't use this for autocommands that delete a
buffer, change to another buffer or change the
contents of a buffer; the result is unpredictable.
+13 -5
View File
@@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2021 Jan 21
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -649,6 +649,8 @@ For other systems the tmpnam() library function is used.
The space between `:substitute` and the 'c', 'g',
'i', 'I' and 'r' flags isn't required, but in scripts
it's a good idea to keep it to avoid confusion.
Also see the two and three letter commands to repeat
:substitute below |:substitute-repeat|.
:[range]~[&][flags] [count] *:~*
Repeat last substitute with same substitute string
@@ -877,20 +879,26 @@ either the first or second pattern in parentheses did not match, so either
*:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si*
*:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp*
*:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl*
*:srn* *:srp*
*:srn* *:srp* *:substitute-repeat*
2-letter and 3-letter :substitute commands ~
These commands repeat the previous `:substitute` command with the given flags.
The first letter is always "s", followed by one or two of the possible flag
characters. For example `:sce` works like `:s///ce`. The table lists the
possible combinations, not all flags are possible, because the command is
short for another command.
List of :substitute commands
| c e g i I n p l r
| c :sc :sce :scg :sci :scI :scn :scp :scl ---
| c :sc :sce :scg :sci :scI :scn :scp :scl
| e
| g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr
| i :sic :sie --- :si :siI :sin :sip --- :sir
| i :sic :sie :si :siI :sin :sip :sir
| I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr
| n
| p
| l
| r :src --- :srg :sri :srI :srn :srp :srl :sr
| r :src :srg :sri :srI :srn :srp :srl :sr
Exceptions:
:scr is `:scriptnames`
+75 -26
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Feb 10
*eval.txt* For Vim version 8.2. Last change: 2021 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -439,8 +439,8 @@ Changing the order of items in a list: >
For loop ~
The |:for| loop executes commands for each item in a list. A variable is set
to each item in the list in sequence. Example: >
The |:for| loop executes commands for each item in a List, String or Blob.
A variable is set to each item in sequence. Example with a List: >
:for item in mylist
: call Doit(item)
:endfor
@@ -457,7 +457,7 @@ If all you want to do is modify each item in the list then the |map()|
function will be a simpler method than a for loop.
Just like the |:let| command, |:for| also accepts a list of variables. This
requires the argument to be a list of lists. >
requires the argument to be a List of Lists. >
:for [lnum, col] in [[1, 3], [2, 8], [3, 0]]
: call Doit(lnum, col)
:endfor
@@ -473,6 +473,14 @@ It is also possible to put remaining items in a List variable: >
: endif
:endfor
For a Blob one byte at a time is used.
For a String one character, including any composing characters, is used as a
String. Example: >
for c in text
echo 'This character is ' .. c
endfor
List functions ~
*E714*
@@ -1187,7 +1195,8 @@ byte under the cursor: >
In Vim9 script:
If expr8 is a String this results in a String that contains the expr1'th
single character from expr8. To use byte indexes use |strpart()|.
single character (including any composing characters) from expr8. To use byte
indexes use |strpart()|.
Index zero gives the first byte or character. Careful: text column numbers
start with one!
@@ -1217,8 +1226,9 @@ In legacy Vim script the indexes are byte indexes. This doesn't recognize
multibyte encodings, see |byteidx()| for computing the indexes. If expr8 is
a Number it is first converted to a String.
In Vim9 script the indexes are character indexes. To use byte indexes use
|strpart()|.
In Vim9 script the indexes are character indexes and include composing
characters. To use byte indexes use |strpart()|. To use character indexes
without including composing characters use |strcharpart()|.
The item at index expr1b is included, it is inclusive. For an exclusive index
use the |slice()| function.
@@ -2935,10 +2945,11 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
ASCII/UTF8 value
str2nr({expr} [, {base} [, {quoted}]])
Number convert String to Number
strcharpart({str}, {start} [, {len}])
strcharlen({expr}) Number character length of the String {expr}
strcharpart({str}, {start} [, {len} [, {skipcc}]])
String {len} characters of {str} at
character {start}
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strftime({format} [, {time}]) String format time with a specified format
strgetchar({str}, {index}) Number get char {index} from {str}
@@ -5108,6 +5119,13 @@ getbufinfo([{dict}])
listed TRUE if the buffer is listed.
lnum Line number used for the buffer when
opened in the current window.
Only valid if the buffer has been
displayed in the window in the past.
If you want the line number of the
last known cursor position in a given
window, use |line()|: >
:echo line('.', {winid})
<
linecount Number of lines in the buffer (only
valid when loaded)
loaded TRUE if the buffer is loaded.
@@ -5312,6 +5330,9 @@ getcharpos({expr})
Get the position for {expr}. Same as |getpos()| but the column
number in the returned List is a character index instead of
a byte index.
If |getpos()| returns a very large column number, such as
2147483647, then getcharpos() will return the character index
of the last character.
Example:
With the cursor on '세' in line 5 with text "여보세요": >
@@ -5791,6 +5812,8 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
The column number in the returned List is the byte position
within the line. To get the character position in the line,
use |getcharpos()|
The column number can be very large, e.g. 2147483647, in which
case it means "after the end of the line".
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
@@ -6091,12 +6114,12 @@ getwininfo([{winid}]) *getwininfo()*
width window width
winbar 1 if the window has a toolbar, 0
otherwise
wincol leftmost screen column of the window,
col from |win_screenpos()|
wincol leftmost screen column of the window;
"col" from |win_screenpos()|
winid |window-ID|
winnr window number
winrow topmost screen column of the window,
row from |win_screenpos()|
winrow topmost screen line of the window;
"row" from |win_screenpos()|
Can also be used as a |method|: >
GetWinnr()->getwininfo()
@@ -7462,7 +7485,8 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
to be used when fast match additions and deletions are
required, for example to highlight matching parentheses.
The list {pos} can contain one of these items:
{pos} is a list of positions. Each position can be one of
these:
- A number. This whole line will be highlighted. The first
line has number 1.
- A list with one number, e.g., [23]. The whole line with this
@@ -7475,7 +7499,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
- A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes.
The maximum number of positions is 8.
The maximum number of positions in {pos} is 8.
Example: >
:highlight MyGroup ctermbg=green guibg=green
@@ -7484,8 +7508,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
:call matchdelete(m)
< Matches added by |matchaddpos()| are returned by
|getmatches()| with an entry "pos1", "pos2", etc., with the
value a list like the {pos} item.
|getmatches()|.
Can also be used as a |method|: >
GetGroup()->matchaddpos([23, 11])
@@ -9925,7 +9948,7 @@ slice({expr}, {start} [, {end}]) *slice()*
Similar to using a |slice| "expr[start : end]", but "end" is
used exclusive. And for a string the indexes are used as
character indexes instead of byte indexes, like in
|vim9script|.
|vim9script|. Also, composing characters are not counted.
When {end} is omitted the slice continues to the last item.
When {end} is -1 the last item is omitted.
@@ -10283,23 +10306,44 @@ str2nr({expr} [, {base} [, {quoted}]]) *str2nr()*
Can also be used as a |method|: >
GetText()->str2nr()
strcharpart({src}, {start} [, {len}]) *strcharpart()*
strcharlen({expr}) *strcharlen()*
The result is a Number, which is the number of characters
in String {expr}. Composing characters are ignored.
|strchars()| can count the number of characters, counting
composing characters separately.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
Can also be used as a |method|: >
GetText()->strcharlen()
strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()*
Like |strpart()| but using character index and length instead
of byte index and length.
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored,
similar to |slice()|.
When a character index is used where a character does not
exist it is assumed to be one character. For example: >
exist it is omitted and counted as one character. For
example: >
strcharpart('abc', -1, 2)
< results in 'a'.
Can also be used as a |method|: >
GetText()->strcharpart(5)
strchars({expr} [, {skipcc}]) *strchars()*
The result is a Number, which is the number of characters
in String {expr}.
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
|strcharlen()| always does this.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
{skipcc} is only available after 7.4.755. For backward
@@ -12790,8 +12834,8 @@ text...
it can no longer be changed (until it is unlocked).
A locked variable can be deleted: >
:lockvar v
:let v = 'asdf' " fails!
:unlet v
:let v = 'asdf' " fails!
:unlet v " works
< *E741* *E940*
If you try to change a locked variable you get an
error message: "E741: Value is locked: {name}".
@@ -13129,7 +13173,12 @@ text...
< If you just want a highlighted message use |:echohl|.
And to get a beep: >
:exe "normal \<Esc>"
<
:echoc[onsole] {expr1} .. *:echoc* *:echoconsole*
Intended for testing: works like `:echomsg` but when
running in the GUI and started from a terminal write
the text to stdout.
*:eval*
:eval {expr} Evaluate {expr} and discard the result. Example: >
:eval Getlist()->Filter()->append('$')
@@ -13159,7 +13208,7 @@ text...
Cannot be followed by a comment.
Examples: >
:execute "buffer" nextbuf
:execute "normal" count . "w"
:execute "normal" count .. "w"
<
":execute" can be used to append a command to commands
that don't accept a '|'. Example: >
@@ -13175,8 +13224,8 @@ text...
file names. The |fnameescape()| function can be used
for Vim commands, |shellescape()| for |:!| commands.
Examples: >
:execute "e " . fnameescape(filename)
:execute "!ls " . shellescape(filename, 1)
:execute "e " .. fnameescape(filename)
:execute "!ls " .. shellescape(filename, 1)
<
Note: The executed string may be any command-line, but
starting or ending "if", "while" and "for" does not
+8 -1
View File
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21
*filetype.txt* For Vim version 8.2. Last change: 2021 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -628,6 +628,13 @@ For fish, add to the config file
set -x MANPAGER "vim -M +MANPAGER -"
MARKDOWN *ft-markdown-plugin*
To enable folding use this: >
let g:markdown_folding = 1
<
PDF *ft-pdf-plugin*
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
+2 -1
View File
@@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2021 Feb 14
*index.txt* For Vim version 8.2. Last change: 2021 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1294,6 +1294,7 @@ tag command action ~
|:edit| :e[dit] edit a file
|:earlier| :ea[rlier] go to older change, undo
|:echo| :ec[ho] echoes the result of expressions
|:echoconsole| :echoc[onsole] like :echomsg but write to stdout
|:echoerr| :echoe[rr] like :echo, show like an error and use history
|:echohl| :echoh[l] set highlighting for echo commands
|:echomsg| :echom[sg] same as :echo, put message in history
+15 -1
View File
@@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
*map.txt* For Vim version 8.2. Last change: 2021 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -263,6 +263,20 @@ input. Example: >
endfunc
nnoremap <expr> <F3> <Sid>OpenPopup()
Also, keep in mind that the expression may be evaluated when looking for
typeahead, before the previous command has been executed. For example: >
func StoreColumn()
let g:column = col('.')
return 'x'
endfunc
nnoremap <expr> x StoreColumn()
nmap ! f!x
You will notice that g:column has the value from before executing "f!",
because "x" is evaluated before "f!" is executed.
This can be solved by inserting <Ignore> before the character that is
expression-mapped: >
nmap ! f!<Ignore>x
Be very careful about side effects! The expression is evaluated while
obtaining characters, you may very well make the command dysfunctional.
For this reason the following is blocked:
+39 -33
View File
@@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -942,8 +942,7 @@ These commands are not marks themselves, but jump to a mark:
line.
*]`*
]` [count] times to lowercase mark after the cursor. {not
in Vi}
]` [count] times to lowercase mark after the cursor.
*['*
[' [count] times to previous line with a lowercase mark
@@ -1037,6 +1036,12 @@ CTRL-I Go to [count] newer cursor position in jump list
(not a motion command).
{not available without the |+jumplist| feature}
NOTE: In the GUI and in a terminal supporting
|modifyOtherKeys|, CTRL-I can be mapped separately
from <Tab>, on the condition that CTRL-I is
mapped before <Tab>, otherwise the mapping applies to
both.
*:ju* *:jumps*
:ju[mps] Print the jump list (not a motion command).
{not available without the |+jumplist| feature}
@@ -1054,11 +1059,11 @@ The maximum number of entries is fixed at 100.
For example, after three jump commands you have this jump list:
jump line col file/text ~
3 1 0 some text ~
2 70 0 another line ~
1 1154 23 end. ~
> ~
jump line col file/text ~
3 1 0 some text ~
2 70 0 another line ~
1 1154 23 end. ~
> ~
The "file/text" column shows the file name, or the text at the jump if it is
in the current file (an indent is removed and a long line is truncated to fit
@@ -1067,11 +1072,11 @@ in the window).
You are currently in line 1167. If you then use the CTRL-O command, the
cursor is put in line 1154. This results in:
jump line col file/text ~
2 1 0 some text ~
1 70 0 another line ~
> 0 1154 23 end. ~
1 1167 0 foo bar ~
jump line col file/text ~
2 1 0 some text ~
1 70 0 another line ~
> 0 1154 23 end. ~
1 1167 0 foo bar ~
The pointer will be set at the last used jump position. The next CTRL-O
command will use the entry above it, the next CTRL-I command will use the
@@ -1098,12 +1103,12 @@ that calling setpos() does not do this.
After the CTRL-O command that got you into line 1154 you could give another
jump command (e.g., "G"). The jump list would then become:
jump line col file/text ~
4 1 0 some text ~
3 70 0 another line ~
2 1167 0 foo bar ~
1 1154 23 end. ~
> ~
jump line col file/text ~
4 1 0 some text ~
3 70 0 another line ~
2 1167 0 foo bar ~
1 1154 23 end. ~
> ~
The line numbers will be adjusted for deleted and inserted lines. This fails
if you stop editing a file without writing, like with ":n!".
@@ -1152,7 +1157,7 @@ Note that when text has been inserted or deleted the cursor position might be
a bit different from the position of the change. Especially when lines have
been deleted.
When the |:keepjumps| command modifier is used the position of a change is not
When the `:keepjumps` command modifier is used the position of a change is not
remembered.
*:changes*
@@ -1193,7 +1198,7 @@ remembered.
#if, #ifdef, #else, #elif, #endif
C preprocessor conditionals (when the
cursor is on the # or no ([{
following)
is following)
For other items the matchit plugin can be used, see
|matchit-install|. This plugin also helps to skip
matches in comments.
@@ -1222,19 +1227,16 @@ remembered.
#if/#else/#endif makes the movement linewise.
*[(*
[( go to [count] previous unmatched '('.
[( Go to [count] previous unmatched '('.
|exclusive| motion.
*[{*
[{ go to [count] previous unmatched '{'.
[{ Go to [count] previous unmatched '{'.
|exclusive| motion.
*])*
]) go to [count] next unmatched ')'.
]) Go to [count] next unmatched ')'.
|exclusive| motion.
*]}*
]} go to [count] next unmatched '}'.
]} Go to [count] next unmatched '}'.
|exclusive| motion.
The above four commands can be used to go to the start or end of the current
@@ -1268,7 +1270,7 @@ bring you back to the switch statement.
class. When no '}' is found before the cursor this is
an error. |exclusive| motion.
The above two commands assume that the file contains a class with methods.
The above four commands assume that the file contains a class with methods.
The class definition is surrounded in '{' and '}'. Each method in the class
is also surrounded with '{' and '}'. This applies to the Java language. The
file looks like this: >
@@ -1282,17 +1284,21 @@ file looks like this: >
body_two();
}
}
[To try this out copy the text and put it in a new buffer, the help text above
confuses the jump commands]
Starting with the cursor on "body_two()", using "[m" will jump to the '{' at
the start of "method_two()" (obviously this is much more useful when the
method is long!). Using "2[m" will jump to the start of "method_one()".
Using "3[m" will jump to the start of the class.
*[#*
[# go to [count] previous unmatched "#if" or "#else".
[# Go to [count] previous unmatched "#if" or "#else".
|exclusive| motion.
*]#*
]# go to [count] next unmatched "#else" or "#endif".
]# Go to [count] next unmatched "#else" or "#endif".
|exclusive| motion.
These two commands work in C programs that contain #if/#else/#endif
@@ -1300,11 +1306,11 @@ constructs. It brings you to the start or end of the #if/#else/#endif where
the current line is included. You can then use "%" to go to the matching line.
*[star* *[/*
[* or [/ go to [count] previous start of a C comment "/*".
[* or [/ Go to [count] previous start of a C comment "/*".
|exclusive| motion.
*]star* *]/*
]* or ]/ go to [count] next end of a C comment "*/".
]* or ]/ Go to [count] next end of a C comment "*/".
|exclusive| motion.
+16 -7
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Feb 13
*options.txt* For Vim version 8.2. Last change: 2021 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -746,6 +746,15 @@ A jump table for the options with a short description can be found at |Q_op|.
or selected.
Note: When this option is on some plugins may not work.
*'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
'autoshelldir' 'asd' boolean (default off)
global
When on, Vim will change the current working directory whenever you
change the directory of the shell running in a terminal window. You
need proper setting-up, so whenever the shell's pwd changes an OSC 7
escape sequence will be emitted. For example, on Linux, you can source
/etc/profile.d/vte.sh in your shell profile if you use bash or zsh.
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
local to window
@@ -3951,7 +3960,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-v'*
'v' Use a vertical button layout for dialogs. When not included,
a horizontal layout is preferred, but when it doesn't fit a
vertical layout is used anyway.
vertical layout is used anyway. Not supported in GTK 3.
*'go-p'*
'p' Use Pointer callbacks for X11 GUI. This is required for some
window managers. If the cursor is not blinking or hollow at
@@ -9000,15 +9009,15 @@ A jump table for the options with a short description can be found at |Q_op|.
*'window'* *'wi'*
'window' 'wi' number (default screen height - 1)
global
Window height. Do not confuse this with the height of the Vim window,
use 'lines' for that.
Used for |CTRL-F| and |CTRL-B| when there is only one window and the
value is smaller than 'lines' minus one. The screen will scroll
'window' minus two lines, with a minimum of one.
Window height used for |CTRL-F| and |CTRL-B| when there is only one
window and the value is smaller than 'lines' minus one. The screen
will scroll 'window' minus two lines, with a minimum of one.
When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
in a much smarter way, taking care of wrapping lines.
When resizing the Vim window, the value is smaller than 1 or more than
or equal to 'lines' it will be set to 'lines' minus 1.
Note: Do not confuse this with the height of the Vim window, use
'lines' for that.
*'winheight'* *'wh'* *E591*
'winheight' 'wh' number (default 1)
+2 -1
View File
@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.2. Last change: 2020 Aug 15
*quickref.txt* For Vim version 8.2. Last change: 2021 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -605,6 +605,7 @@ Short explanation of each option: *option-list*
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
'autoshelldir' 'asd' change directory to the shell's current directory
'arabic' 'arab' for Arabic as a default second language
'arabicshape' 'arshape' do shaping for Arabic characters
'autoindent' 'ai' take indent for new line from previous line
+3 -3
View File
@@ -677,9 +677,9 @@ Your directory layout would be like this:
opt/fooextra/doc/tags " help tags
This allows for the user to do: >
mkdir ~/.vim/pack/myfoobar
cd ~/.vim/pack/myfoobar
git clone https://github.com/you/foobar.git
mkdir ~/.vim/pack
cd ~/.vim/pack
git clone https://github.com/you/foobar.git myfoobar
Here "myfoobar" is a name that the user can choose, the only condition is that
it differs from other packages.
+18 -2
View File
@@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
*sign.txt* For Vim version 8.2. Last change: 2021 Mar 07
VIM REFERENCE MANUAL by Gordon Prieur
@@ -146,6 +146,9 @@ See |sign_define()| for the equivalent Vim script function.
texthl={group}
Highlighting group used for the text item.
Example: >
:sign define MySign text=>> texthl=Search linehl=DiffText
<
DELETING A SIGN *:sign-undefine* *E155*
@@ -155,7 +158,9 @@ See |sign_undefine()| for the equivalent Vim script function.
Deletes a previously defined sign. If signs with this {name}
are still placed this will cause trouble.
Example: >
:sign undefine MySign
<
LISTING SIGNS *:sign-list* *E156*
@@ -209,6 +214,10 @@ See |sign_place()| for the equivalent Vim script function.
Same, but use buffer {nr}. If the buffer argument is not
given, place the sign in the current buffer.
Example: >
:sign place 10 line=99 name=sign3
:sign place 10 line=99 name=sign3 buffer=3
<
*E885*
:sign place {id} name={name} file={fname}
Change the placed sign {id} in file {fname} to use the defined
@@ -221,10 +230,17 @@ See |sign_place()| for the equivalent Vim script function.
"priority={prio}" attribute can be used to change the priority
of an existing sign.
Example: >
:sign place 23 name=sign1 file=/path/to/edit.py
<
:sign place {id} name={name} [buffer={nr}]
Same, but use buffer {nr}. If the buffer argument is not
given, use the current buffer.
Example: >
:sign place 23 name=sign1
:sign place 23 name=sign1 buffer=7
<
REMOVING SIGNS *:sign-unplace* *E159*
+7 -6
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 Jan 21
*syntax.txt* For Vim version 8.2. Last change: 2021 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1741,8 +1741,8 @@ The coloring scheme for tags in the HTML file works as follows.
The <> of opening tags are colored differently than the </> of a closing tag.
This is on purpose! For opening tags the 'Function' color is used, while for
closing tags the 'Type' color is used (See syntax.vim to check how those are
defined for you)
closing tags the 'Identifier' color is used (See syntax.vim to check how those
are defined for you)
Known tag names are colored the same way as statements in C. Unknown tag
names are colored with the same color as the <> or </> respectively which
@@ -2236,9 +2236,10 @@ can use them.
For example, Linux and BSD distributions use groff as their default text
processing package. In order to activate the extra syntax highlighting
features for groff, add the following option to your start-up files: >
features for groff, arrange for files to be recognized as groff (see
|ft-groff-syntax|) or add the following option to your start-up files: >
:let b:nroff_is_groff = 1
:let nroff_is_groff = 1
Groff is different from the old AT&T n/troff that you may still find in
Solaris. Groff macro and request names can be longer than 2 characters and
@@ -4676,7 +4677,7 @@ matches, nextgroup, etc. But there are a few differences:
- A line continuation pattern can be given. It is used to decide which group
of lines need to be searched like they were one line. This means that the
search for a match with the specified items starts in the first of the
consecutive that contain the continuation pattern.
consecutive lines that contain the continuation pattern.
- When using "nextgroup" or "contains", this only works within one line (or
group of continued lines).
- When using a region, it must start and end in the same line (or group of
+9
View File
@@ -57,11 +57,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'ari' options.txt /*'ari'*
'arshape' options.txt /*'arshape'*
'as' todo.txt /*'as'*
'asd' options.txt /*'asd'*
'autochdir' options.txt /*'autochdir'*
'autoindent' options.txt /*'autoindent'*
'autoprint' vi_diff.txt /*'autoprint'*
'autoread' options.txt /*'autoread'*
'autosave' todo.txt /*'autosave'*
'autoshelldir' options.txt /*'autoshelldir'*
'autowrite' options.txt /*'autowrite'*
'autowriteall' options.txt /*'autowriteall'*
'aw' options.txt /*'aw'*
@@ -520,10 +522,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'noari' options.txt /*'noari'*
'noarshape' options.txt /*'noarshape'*
'noas' todo.txt /*'noas'*
'noasd' options.txt /*'noasd'*
'noautochdir' options.txt /*'noautochdir'*
'noautoindent' options.txt /*'noautoindent'*
'noautoread' options.txt /*'noautoread'*
'noautosave' todo.txt /*'noautosave'*
'noautoshelldir' options.txt /*'noautoshelldir'*
'noautowrite' options.txt /*'noautowrite'*
'noautowriteall' options.txt /*'noautowriteall'*
'noaw' options.txt /*'noaw'*
@@ -2420,6 +2424,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:ec eval.txt /*:ec*
:echo eval.txt /*:echo*
:echo-redraw eval.txt /*:echo-redraw*
:echoc eval.txt /*:echoc*
:echoconsole eval.txt /*:echoconsole*
:echoe eval.txt /*:echoe*
:echoerr eval.txt /*:echoerr*
:echoh eval.txt /*:echoh*
@@ -3218,6 +3224,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:stselect tagsrch.txt /*:stselect*
:su change.txt /*:su*
:substitute change.txt /*:substitute*
:substitute-repeat change.txt /*:substitute-repeat*
:sun windows.txt /*:sun*
:sunhide windows.txt /*:sunhide*
:sunm map.txt /*:sunm*
@@ -6667,6 +6674,7 @@ ft-mail.vim syntax.txt /*ft-mail.vim*
ft-make-syntax syntax.txt /*ft-make-syntax*
ft-man-plugin filetype.txt /*ft-man-plugin*
ft-maple-syntax syntax.txt /*ft-maple-syntax*
ft-markdown-plugin filetype.txt /*ft-markdown-plugin*
ft-masm-syntax syntax.txt /*ft-masm-syntax*
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
ft-matlab-indent indent.txt /*ft-matlab-indent*
@@ -9309,6 +9317,7 @@ str2float() eval.txt /*str2float()*
str2list() eval.txt /*str2list()*
str2nr() eval.txt /*str2nr()*
strcasestr() eval.txt /*strcasestr()*
strcharlen() eval.txt /*strcharlen()*
strcharpart() eval.txt /*strcharpart()*
strchars() eval.txt /*strchars()*
strchr() eval.txt /*strchr()*
+10 -4
View File
@@ -888,19 +888,25 @@ like |CTRL-]|.
The function used for generating the taglist is specified by setting the
'tagfunc' option. The function will be called with three arguments:
a:pattern The tag identifier used during the tag search.
a:flags List of flags to control the function behavior.
a:pattern The tag identifier or pattern used during the tag search.
a:flags String containing flags to control the function behavior.
a:info Dict containing the following entries:
buf_ffname Full filename which can be used for priority.
user_data Custom data String, if stored in the tag
stack previously by tagfunc.
Currently two flags may be passed to the tag function:
Currently up to three flags may be passed to the tag function:
'c' The function was invoked by a normal command being processed
(mnemonic: the tag function may use the context around the
cursor to perform a better job of generating the tag list.)
'i' In Insert mode, the user was completing a tag (with
|i_CTRL-X_CTRL-]|).
|i_CTRL-X_CTRL-]| or 'completeopt' contains `t`).
'r' The first argument to tagfunc should be interpreted as a
|pattern| (see |tag-regexp|), such as when using: >
:tag /pat
< It is also given when completing in insert mode.
If this flag is not present, the argument is usually taken
literally as the full tag name.
Note that when 'tagfunc' is set, the priority of the tags described in
|tag-priority| does not apply. Instead, the priority is exactly as the
+2 -1
View File
@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
*testing.txt* For Vim version 8.2. Last change: 2021 Mar 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -168,6 +168,7 @@ test_override({name}, {val}) *test_override()*
wait time of up to 3 seconds for messages
term_props reset all terminal properties when the version
string is detected
uptime overrules sysinfo.uptime
ALL clear all overrides ({val} is not used)
"starting" is to be used when a test should behave like
+5 -3
View File
@@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
*textprop.txt* For Vim version 8.2. Last change: 2021 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -175,6 +175,7 @@ prop_find({props} [, {direction}])
Search for a text property as specified with {props}:
id property with this ID
type property with this type name
both "id" and "type" must both match
bufnr buffer to search in; when present a
start position with "lnum" and "col"
must be given; when omitted the
@@ -187,6 +188,7 @@ prop_find({props} [, {direction}])
skipstart do not look for a match at the start
position
A property matches when either "id" or "type" matches.
{direction} can be "f" for forward and "b" for backward. When
omitted forward search is performed.
@@ -258,8 +260,8 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
properties the one with the highest priority
will be used; negative values can be used, the
default priority is zero
combine when TRUE combine the highlight with any
syntax highlight; when omitted or FALSE syntax
combine when omitted or TRUE combine the highlight
with any syntax highlight; when FALSE syntax
highlight will not be used
start_incl when TRUE inserts at the start position will
be included in the text property
+52 -58
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Feb 20
*todo.txt* For Vim version 8.2. Last change: 2021 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -39,48 +39,19 @@ browser use: https://github.com/vim/vim/issues/1234
-------------------- Known bugs and current work -----------------------
Vim9 - Make everything work:
- Implement "export {one, two three}".
- Disallow :open ?
- ISN_CHECKTYPE could use check_argtype()
- Using a script variable inside a :def function doesn't work if the variable
is inside a block, see Test_nested_function(). Should it work?
- give error for variable name:
var p = function('NoSuchFunc')
- Make closures work better:
- Create closure in a loop. Need to make a list of them.
- If a :def function is called with a function reference, compile it to get
the function type.
def Filter(x: string, Cond: func(string): bool)
Filter(x, (v) => v =~ '^b')
- Make inline function work, to be used as a funcref:
var Ref = (arg: type): type => {
statement
return expr
}
var Ref = (arg: type) => {
statement
statement
}
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type.
- Implement :lockvar and :unlockvar. How about local variables? Perhaps only
allow this for global variables. Use :final or :const otherwise.
- Allow function names that will be script-local to start with lower case
letter? Or also require names with s: prefix to use upper case?
Also apply this function references "var ref = SomeFunc"
- Support passing v:none to use the default argument value. (#6504)
more strict about the argument type (not a bool).
done: balloon_()
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
- Check many more builtin function arguments at compile time.
- make 0 == 'string' fail on the script level, like inside :def.
- Check that when using a user function name without prefix, it does not find
a global function. Prefixing g: is required.
- Need the equivalent of get_lval() and set_var_lval() to implement assignment
to nested list and dict members.
- Assignment to dict doesn't work:
var ret: dict<string> = #{}
ret[i] = string(i)
- Appending to dict item doesn't work:
var d[i] ..= value
- Appending to dict item doesn't work in a :def function:
var d: dict<string> = {a: 'x'}
d['a'] ..= 'y'
d.a ..= 'y'
Test to be extended: Test_assign_dict_with_op()
- Using ".." at script level doesn't convert arguments to a string.
- Compile replacement of :s command: s/pat/\=expr/
- Compile redir to local variable: var_redir_start().
@@ -89,8 +60,6 @@ Vim9 - Make everything work:
islocked()
- When evaluating constants for script variables, some functions could work:
has('asdf'), len('string')
- Implement "as Name" in "import Item as Name from ..."
- Implement using imported items at script level from "import * as X" in
eval_variable(). Should pass the ".xxx" that follows and return that.
- Make "++nr" work. "++g:count" doesn't work, thinks it is a range.
- Reload: How to make sure type of script function hasn't changed?
@@ -102,6 +71,11 @@ Vim9 - Make everything work:
- give an error for "echo Func()" if Func() does not return anything.
- Using "windo echo expr" does not accept a line break inside "expr" (in a
:def function and at script level in a not executed block). #7681
- "assert_fails()" cannot access local variables. Perhaps add this:
assertfails
... cmd ...
endassertfails /E99:.*cmd/
Similar to try/catch/endtry but without the boilerplate.
Once Vim9 is stable:
- Change the help to prefer Vim9 syntax where appropriate
@@ -184,6 +158,7 @@ Text properties:
- Popup attached to text property stays visible when text is deleted with
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
line.
- Auto-indenting may cause highlighting to shift. (#7719)
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
- Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
@@ -263,7 +238,26 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Valgrind reports memory leaks in test_options
Include patch #6290: recognize shell directory change.
Valgrind reports memory leaks in test_options.
Valgrind reports overlapping memcpy in
test_conceal.3
test_edit.1
test_functions.4
test_ins_complete.3
test_method
test_normal
test_popupwin.35 et al.
test_search_stat
Using uninitialized value in test_crypt (can't explain why).
Memory leak in test_debugger
Memory leak in test_paste, using XtOpenDisplay several times
OLD:
TODO: be able to run all parts of test_alot with valgrind separately
Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
@@ -277,9 +271,16 @@ Was originally written by Felipe Morales.
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087) Did patch 8.2.2379 help?
Also, z= in German on a long word can take a very long time, but CTRL-C to
interrupt does not work. Where to add ui_breakcheck()?
Remove SPACE_IN_FILENAME ? It is only used for completion.
Add optional argument to virtcol() that specifies "start", "cursor" or "end"
to tell which value from getvvcol() should be used. (#7964)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why?
@@ -288,6 +289,8 @@ with 'termguicolors'. #1740
Patch for blockwise paste reporting changes: #6660.
Patch to make fillchars global-local. (#5206)
Missing filetype test for bashrc, PKGBUILD, etc.
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
@@ -306,6 +309,10 @@ Try setting a color then request the current color, like using t_u7.
Regexp to search for duplicate lines does not work correctly:
/\(^.*\n\)\1 (Chris Morgan, #6239)
MS-Windows: when writing undo file the infostreams are copied in
mch_copy_file_attribute(), that seems unnecessary. (#7925)
Add a flag to only copy attributes?
Changing a capturing group to non-capturing changes the result: #7607
:echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
aaa
@@ -382,6 +389,10 @@ manager. Problem with Motif?
Patch to add :argdedupe. (Nir Lichtman, #6235)
When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?
:map output does not clear the reset of the command line.
(#5623, also see #5962)
@@ -564,7 +575,7 @@ The quoting of the [command] argument of :terminal is not clearly documented.
Give a few examples. (#4288)
Opening a file with --remote-tab-silent that matches 'wildignore' does not
work, results in (E479: No match". (#4610)
work, results in "E479: No match". (#4610)
7 Add an option to add one pixel column to the character width? Lucida
Console italic is wider than the normal font ("d" overlaps with next char).
@@ -753,14 +764,6 @@ Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
Add buffer argument to undotree(). (#4001)
Memory leak in test_debugger
Using uninitialized value in test_crypt (can't explain why).
Memory leak in test_terminal_fail
TODO: be able to run all parts of test_alot with valgrind separately
Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19.
@@ -1156,9 +1159,6 @@ timer expires.
Rule to use "^" for statusline does not work if a space is defined with
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
8 "stl" and "stlnc" in 'fillchars' don't work for multibyte characters.
Patch by Christian Wellenbrock, 2013 Jul 5.
Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
Fuentes, 2017 Feb 12, #1470)
@@ -1484,9 +1484,6 @@ specifically? First try with the parens, then without.
Patch to add :mapgroup, put mappings in a group like augroup.
(Yasuhiro Matsumoto, 2016 Feb 19)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Can we cache the syntax attributes, so that updates for 'relativenumber' and
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
before combining them.
@@ -2441,9 +2438,6 @@ backslash? (Robert Vibrant, 2008 Jun 5)
When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a
line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21)
Using an insert mode expression mapping, cursor is not in the expected
position. (ZyX, 2010 Aug 29)
After using <Tab> for command line completion after ":ta blah" and getting E33
(no tags file), further editing the command to e.g., ":echo 'blah'", the
command is not executed. Fix by Ian Kelling?
+3 -2
View File
@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2021 Feb 01
*usr_41.txt* For Vim version 8.2. Last change: 2021 Mar 14
VIM USER MANUAL - by Bram Moolenaar
@@ -611,7 +611,8 @@ String manipulation: *string-functions*
stridx() first index of a short string in a long string
strridx() last index of a short string in a long string
strlen() length of a string in bytes
strchars() length of a string in characters
strcharlen() length of a string in characters
strchars() number of characters in a string
strwidth() size of string when displayed
strdisplaywidth() size of string when displayed, deals with tabs
setcellwidths() set character cell width overrides
+3 -3
View File
@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2021 Jan 26
*various.txt* For Vim version 8.2. Last change: 2021 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -575,7 +575,7 @@ N *+X11* Unix only: can restore window title |X11|
it in / any non-ID character (see |'isident'|) can be
used, so long as it does not appear in {pat}. Without
the enclosing character the pattern cannot include the
bar character.
bar character. 'ignorecase' is not used.
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
@@ -727,7 +727,7 @@ K Run a program to lookup the keyword under the
feature}
*:sl!* *:sleep!*
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor.
*:xrestore* *:xr*
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
+1 -1
View File
@@ -2302,7 +2302,7 @@ value didn't fill the whole screen. (SungHyun Nam)
Win32 installer: The generated _vimrc contained an absolute path to diff.exe.
After upgrading it becomes invalid. Now use $VIMRUNTIME instead.
The command line was cleared to often when 'showmode' was set and ":silent
The command line was cleared too often when 'showmode' was set and ":silent
normal vy" was used. Don't clear the command line unless the mode was
actually displayed. Added the "mode_displayed" variable.
+1 -1
View File
@@ -1776,7 +1776,7 @@ Files: runtime/doc/change.txt, runtime/doc/eval.txt,
Patch 7.4.219
Problem: When 'relativenumber' or 'cursorline' are set the window is
redrawn much to often. (Patrick Hemmer, Dominique Pelle)
redrawn much too often. (Patrick Hemmer, Dominique Pelle)
Solution: Check the VALID_CROW flag instead of VALID_WROW.
Files: src/move.c
+72 -9
View File
@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Feb 23
*vim9.txt* For Vim version 8.2. Last change: 2021 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -96,8 +96,8 @@ script and `:def` functions; details are below:
def CallMe(count: number, message: string): bool
- Call functions without `:call`: >
writefile(['done'], 'file.txt')
- You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert` or
curly-braces names.
- You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert`, `:open`
or curly-braces names.
- A range before a command must be prefixed with a colon: >
:%s/this/that
- Unless mentioned specifically, the highest |scriptversion| is used.
@@ -125,6 +125,10 @@ that starts a comment: >
var name = value # comment
var name = value# error!
Do not start a comment with #{, it looks like the legacy dictionary literal
and produces an error where this might be confusing. #{{ or #{{{ are OK,
these can be used to start a fold.
In legacy Vim script # is also used for the alternate file name. In Vim9
script you need to use %% instead. Instead of ## use %%% (stands for all
arguments).
@@ -164,6 +168,15 @@ list type, similar to TypeScript. For example, a list of numbers: >
for item in itemlist
...
When a function argument is optional (it has a default value) passing `v:none`
as the argument results in using the default value. This is useful when you
want to specify a value for an argument that comes after an argument that
should use its default value. Example: >
def MyFunc(one = 'one', last = 'last)
...
enddef
MyFunc(v:none, 'LAST') # first argument uses default value 'one'
Functions and variables are script-local by default ~
*vim9-scopes*
@@ -190,6 +203,12 @@ search for the function:
However, it is recommended to always use "g:" to refer to a global function
for clarity.
Since a script-local function reference can be used without "s:" the name must
start with an upper case letter even when using the "s:" prefix. In legacy
script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions.
In all cases the function must be defined before used. That is when it is
called, when `:defcompile` causes it to be compiled, or when code that calls
it is being compiled (to figure out the return type).
@@ -279,6 +298,9 @@ without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. They can also be deleted
with `:unlet`.
`:lockvar` does not work on local variables. Use `:const` and `:final`
instead.
Variables, functions and function arguments cannot shadow previously defined
or imported variables and functions in the same script file.
Variables may shadow Ex commands, rename the variable if needed.
@@ -341,7 +363,8 @@ Functions can be called without `:call`: >
Using `:call` is still possible, but this is discouraged.
A method call without `eval` is possible, so long as the start is an
identifier or can't be an Ex command. Examples: >
identifier or can't be an Ex command. For a function either "(" or "->" must
be following, without a line break. Examples: >
myList->add(123)
g:myList->add(123)
[1, 2, 3]->Process()
@@ -408,7 +431,18 @@ Additionally, a lambda can contain statements in {}: >
g:was_called = 'yes'
return expression
}
NOT IMPLEMENTED YET
The ending "}" must be at the start of a line. It can be followed by other
characters, e.g.: >
var d = mapnew(dict, (k, v): string => {
return 'value'
})
No command can follow the "{", only a comment can be used there.
Rationale: The "}" cannot be after a command because it would require parsing
the commands to find it. For consistency with that no command can follow the
"{". Unfortunately this means using "() => { command }" does not work, line
breaks are always required.
*vim9-curly*
To avoid the "{" of a dictionary literal to be recognized as a statement block
@@ -696,13 +730,15 @@ for v:null. When converting a boolean to a string "false" and "true" are
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
changed, it is only used in JSON and has no equivalent in other languages.
Indexing a string with [idx] or [idx : idx] uses character indexes instead of
byte indexes. Example: >
Indexing a string with [idx] or taking a slice with [idx : idx] uses character
indexes instead of byte indexes. Composing characters are included.
Example: >
echo 'bár'[1]
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
script this results in the string 'á'.
A negative index is counting from the end, "[-1]" is the last character.
To exclude the last character use |slice()|.
To count composing characters separately use |strcharpart()|.
If the index is out of range then an empty string results.
In legacy script "++var" and "--var" would be silently accepted and have no
@@ -800,6 +836,8 @@ Patterns are used like 'magic' is set, unless explicitly overruled.
The 'edcompatible' option value is not used.
The 'gdefault' option value is not used.
You may also find this wiki useful. It was written by an early adoptor of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
==============================================================================
@@ -843,6 +881,8 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
:enddef End of a function defined with `:def`. It should be on
a line by its own.
You may also find this wiki useful. It was written by an early adoptor of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
If the script the function is defined in is Vim9 script, then script-local
variables can be accessed without the "s:" prefix. They must be defined
@@ -886,6 +926,27 @@ For these the backtick expansion can be used. Example: >
g/pattern/s/^/`=newText`/
enddef
Closures defined in a loop will share the same context. For example: >
var flist: list<func>
for i in range(10)
var inloop = i
flist[i] = () => inloop
endfor
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 9. This is
efficient. If you do want a separate context for each closure call a function
to define it: >
def GetFunc(i: number): func
var inloop = i
return () => inloop
enddef
var flist: list<func>
for i in range(10)
flist[i] = GetFunc(i)
endfor
==============================================================================
4. Types *vim9-types*
@@ -1076,7 +1137,9 @@ A side effect of `:vim9script` is that the 'cpoptions' option is set to the
Vim default value, like with: >
:set cpo&vim
One of the effects is that |line-continuation| is always enabled.
The original value of 'cpoptions' is restored at the end of the script.
The original value of 'cpoptions' is restored at the end of the script, while
flags added or removed in the script are also added to or removed from the
original value to get the same effect. The order of flags may change.
*vim9-mix*
There is one way to use both legacy and Vim9 syntax in one script file: >
@@ -1111,7 +1174,7 @@ Exporting an item can be written as: >
export class MyClass ...
As this suggests, only constants, variables, `:def` functions and classes can
be exported. {classes are not implemented yet}
be exported. {not implemented yet: export class}
*E1042*
`:export` can only be used in Vim9 script, at the script level.
+3 -3
View File
@@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2021 Feb 06
*windows.txt* For Vim version 8.2. Last change: 2021 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -790,7 +790,7 @@ can also get to them with the buffer list commands, like ":bnext".
Examples: >
:windo set nolist nofoldcolumn | normal zn
:windo set nolist foldcolumn=0 | normal! zn
This resets the 'list' option and disables folding in all windows. >
@@ -798,7 +798,7 @@ This resets the 'list' option and disables folding in all windows. >
This resets the 'fileencoding' in each buffer and writes it if this changed
the buffer. The result is that all buffers will use the 'encoding' encoding
(if conversion works properly).
(if conversion succeeds).
==============================================================================
9. Tag or file name under the cursor *window-tag*
+10 -1
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 21
" Last Change: 2021 Mar 19
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -168,6 +168,9 @@ au BufNewFile,BufRead *.mar setf vmasm
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
" Atom is based on XML
au BufNewFile,BufRead *.atom setf xml
" Autoit v3
au BufNewFile,BufRead *.au3 setf autoit
@@ -1334,6 +1337,9 @@ au BufNewFile,BufRead *.pml setf promela
au BufNewFile,BufRead *.proto setf proto
au BufNewFile,BufRead *.pbtxt setf pbtxt
" Poke
au BufNewFile,BufRead *.pk setf poke
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols
@@ -1391,6 +1397,9 @@ else
au BufNewFile,BufRead *.rmd,*.smd setf rmd
endif
" RSS looks like XML
au BufNewFile,BufRead *.rss setf xml
" R reStructuredText file
if has("fname_case")
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
+1 -1
View File
@@ -4,7 +4,7 @@
" URL: http://sites.google.com/site/khorser/opensource/vim
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Oct 23, 2013
" Last Change: Mar 10, 2021
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
+32
View File
@@ -0,0 +1,32 @@
" Vim filetype plugin file
" Language: GNU Poke
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 March 11
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal include=load
setlocal suffixesadd=.pk
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8
+8 -4
View File
@@ -62,10 +62,14 @@ fun! CdlGetIndent(lnum)
" PREVIOUS LINE
let ind = indent(lnum)
let line = getline(lnum)
let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet
" one 'closing' element at the beginning of the line has already reduced the
" indent, but 'else', 'elseif' & 'then' increment it for the next line
" '=' at the beginning has already de right indent (increased for asignments)
" Whether a '=' is a conditional or an assignment. -1 means we don't know
" yet.
" One 'closing' element at the beginning of the line has already reduced the
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
" '=' at the beginning already has the right indent (increased for
" asignments).
let f = -1
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
if inicio > 0
let c = line[inicio-1]
+2
View File
@@ -266,6 +266,8 @@ if exists("+autochdir")
call <SID>AddOption("autochdir", gettext("change to directory of file in buffer"))
call <SID>BinOptionG("acd", &acd)
endif
call <SID>AddOption("autoshelldir", gettext("change to pwd of shell in terminal buffer"))
call <SID>BinOptionG("asd", &asd)
call <SID>AddOption("wrapscan", gettext("search commands wrap around the end of the buffer"))
call <SID>BinOptionG("ws", &ws)
call <SID>AddOption("incsearch", gettext("show match for partly typed search command"))
+68 -44
View File
@@ -1,16 +1,22 @@
" Vim syntax file
" Language: Dot
" Filenames: *.dot
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/syntax/dot.vim
" Last Change: 2011 May 17 - improved identifier matching + two new keywords
" Last Change: 2021 Mar 24 - better attr + escape string matching, new keywords (Farbod Salamat-Zadeh)
" 2011 May 17 - improved identifier matching + two new keywords
" 2001 May 04 - initial version
" quit when a syntax file was already loaded
if exists("b:current_syntax")
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
" Errors
syn match dotParErr ")"
syn match dotBrackErr "]"
@@ -29,39 +35,43 @@ syn keyword dotTodo contained TODO FIXME XXX
" Strings
syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+
" Escape strings
syn match dotEscString /\v\\(N|G|E|T|H|L)/ containedin=dotString
syn match dotEscString /\v\\(n|l|r)/ containedin=dotString
" General keywords
syn keyword dotKeyword digraph node edge subgraph
syn keyword dotKeyword graph digraph subgraph node edge strict
" Graph attributes
syn keyword dotType center layers margin mclimit name nodesep nslimit
syn keyword dotType ordering page pagedir rank rankdir ranksep ratio
syn keyword dotType rotate size
" Node attributes
syn keyword dotType distortion fillcolor fontcolor fontname fontsize
syn keyword dotType height layer orientation peripheries regular
syn keyword dotType shape shapefile sides skew width
" Edge attributes
syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP
syn keyword dotType dir headclip headlabel headport labelangle labeldistance
syn keyword dotType labelfontcolor labelfontname labelfontsize
syn keyword dotType minlen port_label_distance samehead sametail
syn keyword dotType tailclip taillabel tailport weight
" Shared attributes (graphs, nodes, edges)
syn keyword dotType color
" Shared attributes (graphs and edges)
syn keyword dotType bgcolor label URL
" Shared attributes (nodes and edges)
syn keyword dotType fontcolor fontname fontsize layer style
" Node, edge and graph attributes
syn keyword dotType _background area arrowhead arrowsize arrowtail bb bgcolor
\ center charset class clusterrank color colorscheme comment compound
\ concentrate constraint Damping decorate defaultdist dim dimen dir
\ diredgeconstraints distortion dpi edgehref edgetarget edgetooltip
\ edgeURL epsilon esep fillcolor fixedsize fontcolor fontname fontnames
\ fontpath fontsize forcelabels gradientangle group head_lp headclip
\ headhref headlabel headport headtarget headtooltip headURL height href
\ id image imagepath imagepos imagescale inputscale K label label_scheme
\ labelangle labeldistance labelfloat labelfontcolor labelfontname
\ labelfontsize labelhref labeljust labelloc labeltarget labeltooltip
\ labelURL landscape layer layerlistsep layers layerselect layersep
\ layout len levels levelsgap lhead lheight lp ltail lwidth margin
\ maxiter mclimit mindist minlen mode model mosek newrank nodesep
\ nojustify normalize notranslate nslimit nslimit1 ordering orientation
\ outputorder overlap overlap_scaling overlap_shrink pack packmode pad
\ page pagedir pencolor penwidth peripheries pin pos quadtree quantum
\ rank rankdir ranksep ratio rects regular remincross repulsiveforce
\ resolution root rotate rotation samehead sametail samplepoints scale
\ searchsize sep shape shapefile showboxes sides size skew smoothing
\ sortv splines start style stylesheet tail_lp tailclip tailhref
\ taillabel tailport tailtarget tailtooltip tailURL target tooltip
\ truecolor URL vertices viewport voro_margin weight width xdotversion
\ xlabel xlp z
" Special chars
syn match dotKeyChar "="
syn match dotKeyChar ";"
syn match dotKeyChar "->"
syn match dotKeyChar "--"
" Identifier
syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/
@@ -71,27 +81,41 @@ syn sync minlines=50
syn sync maxlines=500
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_dot_syntax_inits")
if version < 508
let did_dot_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
hi def link dotParErr Error
hi def link dotBraceErr Error
hi def link dotBrackErr Error
HiLink dotParErr Error
HiLink dotBraceErr Error
HiLink dotBrackErr Error
hi def link dotComment Comment
hi def link dotTodo Todo
HiLink dotComment Comment
HiLink dotTodo Todo
hi def link dotParEncl Keyword
hi def link dotBrackEncl Keyword
hi def link dotBraceEncl Keyword
HiLink dotParEncl Keyword
HiLink dotBrackEncl Keyword
HiLink dotBraceEncl Keyword
hi def link dotKeyword Keyword
hi def link dotType Type
hi def link dotKeyChar Keyword
HiLink dotKeyword Keyword
HiLink dotType Type
HiLink dotKeyChar Keyword
hi def link dotString String
hi def link dotIdentifier Identifier
HiLink dotString String
HiLink dotEscString Keyword
HiLink dotIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "dot"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: ts=8
+2 -2
View File
@@ -1,7 +1,7 @@
" VIM syntax file
" Language: groff
" Maintainer: Alejandro López-Valencia <dradul@yahoo.com>
" URL: http://dradul.tripod.com/vim
" Maintainer: John Marshall <jmarshall@hey.com>
" Previous Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" Last Change: 2003-05-08-12:41:13 GMT-5.
" This uses the nroff.vim syntax file.
+25 -44
View File
@@ -3,8 +3,9 @@
" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
" Last Change: 2021 Feb 25
" Last Change: 2021 Mar 02
" Included patch #7900 to fix comments
" Included patch #7916 to fix a few more things
"
" Please check :help html.vim for some comments and a description of the options
@@ -79,26 +80,16 @@ syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
" aria attributes
syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
exe 'syn match htmlArg contained "\<aria-\%(' . join([
\ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount',
\ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details',
\ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed',
\ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level',
\ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns',
\ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required',
\ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize',
\ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext'
\ ], '\|') . '\)\>"'
syn keyword htmlArg contained role
" Netscape extensions
@@ -139,25 +130,19 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" Comments (the real ones or the old netscape ones)
if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
else
" The HTML 5.2 syntax 8.2.4.41-42: bogus comment is parser error; browser skips until next &gt;
" Note: must stand first to get lesser :syn-priority
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError
" Normal comment opening <!-- ...>
syn region htmlComment start=+<!--+ end=+>+ contains=htmlCommentPart,@Spell
" Idem 8.2.4.43-44: <!--> and <!---> are parser errors; browser treats as comments
syn match htmlComment "<!---\?>" contains=htmlCommentError
" Idem 8.2.4.51: any number of consecutive dashes within comment is okay; --> closes comment
" Idem 8.2.4.52: closing comment by dash-dash-bang (--!>) is error ignored by parser(!); closes comment
syn region htmlCommentPart contained start=+--+ end=+--!\?>+me=e-1 contains=htmlCommentNested,@htmlPreProc,@Spell
" Idem 8.2.4.49: opening nested comment <!-- is parser error, ignored by browser, except <!--> is all right
syn match htmlCommentNested contained "<!--[^>]"me=e-1
syn match htmlCommentNested contained "<!--->"me=e-3
syn match htmlCommentNested contained "<!---\?!>"me=e-4
syn match htmlCommentError contained "[^><!]"
" The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next &gt
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend
" Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
" Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
" Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend
" Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
syn match htmlCommentNested contained "<!-->\@!"
syn match htmlCommentError contained "[^><!]"
endif
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend
" server-parsed commands
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
@@ -278,7 +263,7 @@ hi def link htmlEndTag Identifier
hi def link htmlArg Type
hi def link htmlTagName htmlStatement
hi def link htmlSpecialTagName Exception
hi def link htmlValue String
hi def link htmlValue String
hi def link htmlSpecialChar Special
if !exists("html_no_rendering")
@@ -322,14 +307,10 @@ hi def link htmlPreProc PreProc
hi def link htmlPreAttr String
hi def link htmlPreProcAttrName PreProc
hi def link htmlPreProcAttrError Error
hi def link htmlSpecial Special
hi def link htmlSpecialChar Special
hi def link htmlString String
hi def link htmlStatement Statement
hi def link htmlComment Comment
hi def link htmlCommentPart Comment
hi def link htmlValue String
hi def link htmlCommentNested htmlCommentError
hi def link htmlCommentNested htmlError
hi def link htmlCommentError htmlError
hi def link htmlTagError htmlError
hi def link htmlEvent javaScript
+2 -1
View File
@@ -7,7 +7,7 @@
" (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members
" Last Change: 2020 May 14
" Last Change: 2021 Mar 30
" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
" 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder)
@@ -41,6 +41,7 @@ syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbed
syn match javaScriptSpecialCharacter "'\\.'"
syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn match javaScriptNumber "-\=\<\d\+\%(_\d\+\)*\>"
syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline
syn keyword javaScriptConditional if else switch
+19 -19
View File
@@ -1,16 +1,9 @@
" VIM syntax file
" Language: nroff/groff
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" URL: http://vorbote.wordpress.com/
" Last Change: 2012 Feb 2
"
" {{{1 Acknowledgements
"
" ACKNOWLEDGEMENTS:
"
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
" creator and maintainer of this syntax file for several years.
" May I be as good at it as he has been.
" Maintainer: John Marshall <jmarshall@hey.com>
" Previous Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" Previous Maintainer: Jérôme Plût <Jerome.Plut@ens.fr>
" Last Change: 2021 Mar 28
"
" {{{1 Todo
"
@@ -31,6 +24,13 @@ endif
let s:cpo_save = &cpo
set cpo&vim
if exists("nroff_is_groff")
let b:nroff_is_groff = 1
endif
syn spell toplevel
syn case match
"
" {{{1 plugin settings...
"
@@ -48,7 +48,7 @@ endif
"
setlocal paragraphs+=XP
"
" {{{2 Activate navigation to preporcessor sections.
" {{{2 Activate navigation to preprocessor sections.
"
if exists("b:preprocs_as_sections")
setlocal sections=EQTSPS[\ G1GS
@@ -169,9 +169,9 @@ endif
" <jp />
syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ contains=@Spell
syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ contains=@Spell
syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/
syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
@@ -179,11 +179,11 @@ syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
" ------------------------------------------------------------
syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo
syn match nroffComment /^'''.*/ contains=nroffTodo
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo,@Spell
syn match nroffComment /^'''.*/ contains=nroffTodo,@Spell
if exists("b:nroff_is_groff")
syn match nroffComment "\\#.*$" contains=nroffTodo
syn match nroffComment "\\#.*$" contains=nroffTodo,@Spell
endif
syn keyword nroffTodo TODO XXX FIXME contained
@@ -198,7 +198,7 @@ syn keyword nroffTodo TODO XXX FIXME contained
"
hi def link nroffEscChar nroffSpecialChar
hi def link nroffEscCharAr nroffSpecialChar
hi def link nroffEscCharArg nroffSpecialChar
hi def link nroffSpecialChar SpecialChar
hi def link nroffSpace Delimiter
@@ -211,7 +211,7 @@ hi def link nroffEscPar nroffEscape
hi def link nroffEscRegPar nroffEscape
hi def link nroffEscArg nroffEscape
hi def link nroffSize nroffEscape
hi def link nroffEscape Preproc
hi def link nroffEscape PreProc
hi def link nroffIgnore Comment
hi def link nroffComment Comment
+151
View File
@@ -0,0 +1,151 @@
" Copyright (C) 2021 Matthew T. Ihlenfield.
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" Vim syntax file
" Language: Poke
" Maintainer: Matt Ihlenfield <mtihlenfield@protonmail.com>
" Filenames: *.pk
" Latest Revision: 10 March 2021
if exists('b:current_syntax')
finish
endif
" Poke statement
syn keyword pokeStatement assert break continue return
syn keyword pokeStatement type unit fun method nextgroup=pokeFunction skipwhite
syn keyword pokeStatement var nextgroup=pokeVar skipWhite
" Identifiers
syn match pokeVar '\h\w*' display contained
" User defined functions
syn match pokeFunction '\h\w*' display contained
" Poke operators
syn keyword pokeOperator in sizeof as isa unmap
" Conditionals
syn keyword pokeConditional if else where
" Structures, unions, etc...
syn keyword pokeStructure struct union pinned
" Loops
syn keyword pokeRepeat while for
" Imports
syn keyword pokeLoad load
" Exceptions
syn keyword pokeException try catch until raise
" Exception types
syn keyword pokeExceptionType Exception E_generic E_out_of_bounds
syn keyword pokeExceptionType E_eof E_elem E_constraint
syn keyword pokeExceptionType E_conv E_map_bounds E_map
syn keyword pokeExceptionType E_div_by_zero E_no_ios E_no_return
syn keyword pokeExceptionType E_io E_io_flags E_assert E_overflow
" Exception codes
syn keyword pokeExceptionCode EC_generic EC_out_of_bounds
syn keyword pokeExceptionCode EC_eof EC_elem EC_constraint
syn keyword pokeExceptionCode EC_conv EC_map_bounds EC_map
syn keyword pokeExceptionCode EC_div_by_zero EC_no_ios EC_no_return
syn keyword pokeExceptionCode EC_io EC_io_flags EC_assert EC_overflow
" Poke builtin types
syn keyword pokeBuiltinType string void int uint bit nibble
syn keyword pokeBuiltinType byte char ushort short ulong long
syn keyword pokeBuiltinType uint8 uint16 uint32 uint64
syn keyword pokeBuiltinType off64 uoff64 offset
syn keyword pokeBuiltinType Comparator POSIX_Time32 POSIX_Time64
syn keyword pokeBuiltinType big little any
" Poke constants
syn keyword pokeConstant ENDIAN_LITTLE ENDIAN_BIG
syn keyword pokeConstant IOS_F_READ IOS_F_WRITE IOS_F_TRUNCATE IOS_F_CREATE
syn keyword pokeConstant IOS_M_RDONLY IOS_M_WRONLY IOS_M_RDWR
syn keyword pokeConstant load_path NULL OFFSET
" Poke std lib
syn keyword pokeBuiltinFunction print printf catos stoca atoi ltos reverse
syn keyword pokeBuiltinFunction ltrim rtrim strchr qsort crc32 alignto
syn keyword pokeBuiltinFunction open close flush get_ios set_ios iosize
syn keyword pokeBuiltinFunction rand get_endian set_endian strace exit
syn keyword pokeBuiltinFunction getenv
" Formats
" Special chars
syn match pokeSpecial "\\\([nt\\]\|\o\{1,3}\)" display contained
" Chars
syn match pokeChar "'[^']*'" contains=pokeSpecial
" Attributes
syn match pokeAttribute "\h\w*'\h\w"
" Strings
syn region pokeString skip=+\\\\\|\\"+ start=+"+ end=+"+ contains=pokeSpecial
" Integer literals
syn match pokeInteger "\<\d\+_*\d*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Xx]\x\+_*\x*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Oo]\o\+_*\o*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Bb][01]\+_*[01]*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
" Units
syn keyword pokeBuiltinUnit b M B
syn keyword pokeBuiltinUnit Kb KB Mb MB Gb GB
syn keyword pokeBuiltinUnit Kib KiB Mib MiB Gib GiB
" Offsets
syn match pokeOffset "#\h\w*" contains=pokeBuiltinUnit
" Comments
syn keyword pokeCommentTodo TODO FIXME XXX TBD contained
syn match pokeLineComment "\/\/.*" contains=pokeCommentTodo,@Spell extend
syn region pokeComment start="/\*" end="\*/" contains=pokeCommentTodo,@Spell fold extend
" Allow folding of blocks
syn region pokeBlock start="{" end="}" transparent fold
" Highlight groups
hi def link pokeBuiltinFunction Function
hi def link pokeBuiltinType Type
hi def link pokeBuiltinUnit Keyword
hi def link pokeChar Character
hi def link pokeComment Comment
hi def link pokeCommentTodo Todo
hi def link pokeConditional Conditional
hi def link pokeConstant Constant
hi def link pokeException Exception
hi def link pokeExceptionCode Constant
hi def link pokeExceptionType Type
hi def link pokeFunction Function
hi def link pokeInteger Number
hi def link pokeLineComment Comment
hi def link pokeLoad Include
hi def link pokeOffset StorageClass
hi def link pokeOperator Operator
hi def link pokeSpecial SpecialChar
hi def link pokeStatement Statement
hi def link pokeString String
hi def link pokeStructure Structure
hi def link pokeRepeat Repeat
hi def link pokeVar Identifier
let b:current_syntax = 'poke'
+9 -3
View File
@@ -1,14 +1,15 @@
" Vim syntax file
" Language: OpenSSH client configuration file (ssh_config)
" Author: David Necas (Yeti)
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Maintainer: Jakub Jelen <jakuje at gmail dot com>
" Previous Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
" Last Change: 2020 Feb 12
" Last Change: 2021 Mar 29
" Added RemoteCommand from pull request #4809
" Included additional keywords from Martin.
" SSH Version: 7.4p1
" SSH Version: 8.5p1
"
" Setup
@@ -174,6 +175,7 @@ syn keyword sshconfigKeyword HostKeyAlgorithms
syn keyword sshconfigKeyword HostKeyAlias
syn keyword sshconfigKeyword HostName
syn keyword sshconfigKeyword HostbasedAuthentication
syn keyword sshconfigKeyword HostbasedAcceptedAlgorithms
syn keyword sshconfigKeyword HostbasedKeyTypes
syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword IdentitiesOnly
@@ -185,9 +187,11 @@ syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword KbdInteractiveAuthentication
syn keyword sshconfigKeyword KbdInteractiveDevices
syn keyword sshconfigKeyword KexAlgorithms
syn keyword sshconfigKeyword KnownHostsCommand
syn keyword sshconfigKeyword LocalCommand
syn keyword sshconfigKeyword LocalForward
syn keyword sshconfigKeyword LogLevel
syn keyword sshconfigKeyword LogVerbose
syn keyword sshconfigKeyword MACs
syn keyword sshconfigKeyword Match
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
@@ -195,11 +199,13 @@ syn keyword sshconfigKeyword NumberOfPasswordPrompts
syn keyword sshconfigKeyword PKCS11Provider
syn keyword sshconfigKeyword PasswordAuthentication
syn keyword sshconfigKeyword PermitLocalCommand
syn keyword sshconfigKeyword PermitRemoteOpen
syn keyword sshconfigKeyword Port
syn keyword sshconfigKeyword PreferredAuthentications
syn keyword sshconfigKeyword ProxyCommand
syn keyword sshconfigKeyword ProxyJump
syn keyword sshconfigKeyword ProxyUseFDPass
syn keyword sshconfigKeyword PubkeyAcceptedAlgorithms
syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes
syn keyword sshconfigKeyword PubkeyAuthentication
syn keyword sshconfigKeyword RekeyLimit
+7 -2
View File
@@ -7,8 +7,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
" Last Change: 2020-10-20
" SSH Version: 8.4p1
" Last Change: 2021-03-29
" SSH Version: 8.5p1
"
" Setup
@@ -195,6 +195,7 @@ syn keyword sshdconfigKeyword HostCertificate
syn keyword sshdconfigKeyword HostKey
syn keyword sshdconfigKeyword HostKeyAgent
syn keyword sshdconfigKeyword HostKeyAlgorithms
syn keyword sshdconfigKeyword HostbasedAcceptedAlgorithms
syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes
syn keyword sshdconfigKeyword HostbasedAuthentication
syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
@@ -213,6 +214,7 @@ syn keyword sshdconfigKeyword KexAlgorithms
syn keyword sshdconfigKeyword KeyRegenerationInterval
syn keyword sshdconfigKeyword ListenAddress
syn keyword sshdconfigKeyword LogLevel
syn keyword sshdconfigKeyword LogVerbose
syn keyword sshdconfigKeyword LoginGraceTime
syn keyword sshdconfigKeyword MACs
syn keyword sshdconfigKeyword Match
@@ -220,6 +222,8 @@ syn keyword sshdconfigKeyword MaxAuthTries
syn keyword sshdconfigKeyword MaxSessions
syn keyword sshdconfigKeyword MaxStartups
syn keyword sshdconfigKeyword PasswordAuthentication
syn keyword sshdconfigKeyword PerSourceMaxStartups
syn keyword sshdconfigKeyword PerSourceNetBlockSize
syn keyword sshdconfigKeyword PermitBlacklistedKeys
syn keyword sshdconfigKeyword PermitEmptyPasswords
syn keyword sshdconfigKeyword PermitListen
@@ -234,6 +238,7 @@ syn keyword sshdconfigKeyword Port
syn keyword sshdconfigKeyword PrintLastLog
syn keyword sshdconfigKeyword PrintMotd
syn keyword sshdconfigKeyword Protocol
syn keyword sshdconfigKeyword PubkeyAcceptedAlgorithms
syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes
syn keyword sshdconfigKeyword PubkeyAuthentication
syn keyword sshdconfigKeyword PubkeyAuthOptions
+4 -3
View File
@@ -1,7 +1,8 @@
" Vim syntax file
" Language: sudoers(5) configuration files
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2018-08-18
" Latest Revision: 2021 Mar 15
" Recent Changes: Support for #include and #includedir.
" Added many new options (Samuel D. Leslie)
@@ -26,7 +27,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS
syn keyword sudoersTodo contained TODO FIXME XXX NOTE
syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$'
syn region sudoersInclude display oneline start='[#@]\%(include\|includedir\)\>' end='$'
syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
@@ -201,7 +202,7 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ shell_noargs
\ stay_setuid
\ sudoedit_checkdir
\ sudoedit_fellow
\ sudoedit_follow
\ syslog_pid
\ targetpw
\ tty_tickets
+7 -3
View File
@@ -60,8 +60,8 @@ To built Vim on Ubuntu from scratch on a clean system using git:
% sudo apt install libxt-dev
% make reconfig
Add GUI support (ignore compiler warnings):
% sudo apt install libgtk2.0-dev
Add GUI support:
% sudo apt install libgtk-3-dev
% make reconfig
Add Python 3 support:
@@ -134,8 +134,12 @@ These configure arguments can be used to select which GUI to use:
--disable-motif-check
--disable-athena-check
This configure argument can be used to disable the GUI, even when the necessary
files are found:
--disable-gui
--enable-gui defaults to "auto", so it will automatically look for a GUI (in
the order of GTK, Motif, then Athena). If one is found, then is uses it and
the order of GTK, Motif, then Athena). If one is found, then it is used and
does not proceed to check any of the remaining ones. Otherwise, it moves on
to the next one.
+1 -1
View File
@@ -1255,7 +1255,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>170</string>
<string>171</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>NSAppTransportSecurity</key>
+2 -3
View File
@@ -1138,7 +1138,7 @@ static void grid_free(Grid *grid) {
if (!strCache){
strCache = characterLines[key] = [[[NSCache alloc] init] autorelease];
}
CTLineRef line = (CTLineRef)[strCache objectForKey:string];
CTLineRef line = (CTLineRef)[[strCache objectForKey:string] retain];
if (!line) {
NSAttributedString *attrString = [[NSAttributedString alloc]
initWithString:string
@@ -1150,9 +1150,8 @@ static void grid_free(Grid *grid) {
line = CTLineCreateWithAttributedString((CFAttributedStringRef)attrString);
[attrString release];
[strCache setObject:(id)line forKey:[[string copy] autorelease]];
CFRelease(line);
}
return line;
return (CTLineRef)[(id)line autorelease];
}
@end // MMCoreTextView (Private)
+69 -61
View File
@@ -171,7 +171,6 @@
0395A8310D71ED7800881434 /* DBPrefsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBPrefsWindowController.h; sourceTree = "<group>"; };
0395A8320D71ED7800881434 /* DBPrefsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBPrefsWindowController.m; sourceTree = "<group>"; };
0395A8A90D72D88B00881434 /* General.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = General.png; sourceTree = "<group>"; };
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1D09AB3F0C6A4D520045497E /* MMTypesetter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMTypesetter.h; sourceTree = "<group>"; };
1D09AB400C6A4D520045497E /* MMTypesetter.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMTypesetter.m; sourceTree = "<group>"; };
@@ -304,7 +303,6 @@
90922A41221D429500F1E1F4 /* iscygpty.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = iscygpty.c; path = ../iscygpty.c; sourceTree = "<group>"; };
90922A42221D429600F1E1F4 /* if_python3.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = if_python3.c; path = ../if_python3.c; sourceTree = "<group>"; };
90922A43221D429600F1E1F4 /* dict.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dict.c; path = ../dict.c; sourceTree = "<group>"; };
90922A44221D429600F1E1F4 /* gui_mac.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = gui_mac.c; path = ../gui_mac.c; sourceTree = "<group>"; };
90922A45221D429600F1E1F4 /* kword_test.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = kword_test.c; path = ../kword_test.c; sourceTree = "<group>"; };
90922A46221D429600F1E1F4 /* if_perlsfio.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = if_perlsfio.c; path = ../if_perlsfio.c; sourceTree = "<group>"; };
90922A47221D429600F1E1F4 /* pty.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pty.c; path = ../pty.c; sourceTree = "<group>"; };
@@ -326,14 +324,12 @@
90922A57221D429700F1E1F4 /* hardcopy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = hardcopy.c; path = ../hardcopy.c; sourceTree = "<group>"; };
90922A58221D429700F1E1F4 /* list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = list.c; path = ../list.c; sourceTree = "<group>"; };
90922A59221D429700F1E1F4 /* glbl_ime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = glbl_ime.h; path = ../glbl_ime.h; sourceTree = "<group>"; };
90922A5A221D429700F1E1F4 /* hangulin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = hangulin.c; path = ../hangulin.c; sourceTree = "<group>"; };
90922A5B221D429700F1E1F4 /* eval.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = eval.c; path = ../eval.c; sourceTree = "<group>"; };
90922A5C221D429700F1E1F4 /* userfunc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = userfunc.c; path = ../userfunc.c; sourceTree = "<group>"; };
90922A5D221D429700F1E1F4 /* os_mac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = os_mac.h; path = ../os_mac.h; sourceTree = "<group>"; };
90922A5E221D429700F1E1F4 /* nbdebug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = nbdebug.h; path = ../nbdebug.h; sourceTree = "<group>"; };
90922A5F221D429700F1E1F4 /* message_test.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = message_test.c; path = ../message_test.c; sourceTree = "<group>"; };
90922A60221D429800F1E1F4 /* tag.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tag.c; path = ../tag.c; sourceTree = "<group>"; };
90922A61221D429800F1E1F4 /* xpm_w32.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = xpm_w32.c; path = ../xpm_w32.c; sourceTree = "<group>"; };
90922A62221D429800F1E1F4 /* blowfish.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = blowfish.c; path = ../blowfish.c; sourceTree = "<group>"; };
90922A63221D429800F1E1F4 /* message.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = message.c; path = ../message.c; sourceTree = "<group>"; };
90922A64221D429800F1E1F4 /* termlib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = termlib.c; path = ../termlib.c; sourceTree = "<group>"; };
@@ -353,7 +349,6 @@
90922A72221D429900F1E1F4 /* dosinst.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dosinst.c; path = ../dosinst.c; sourceTree = "<group>"; };
90922A73221D429900F1E1F4 /* ops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ops.c; path = ../ops.c; sourceTree = "<group>"; };
90922A74221D429900F1E1F4 /* ex_getln.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ex_getln.c; path = ../ex_getln.c; sourceTree = "<group>"; };
90922A75221D429900F1E1F4 /* winclip.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = winclip.c; path = ../winclip.c; sourceTree = "<group>"; };
90922A76221D429900F1E1F4 /* ui.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ui.c; path = ../ui.c; sourceTree = "<group>"; };
90922A77221D429900F1E1F4 /* fold.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fold.c; path = ../fold.c; sourceTree = "<group>"; };
90922A78221D429A00F1E1F4 /* menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = menu.c; path = ../menu.c; sourceTree = "<group>"; };
@@ -370,7 +365,6 @@
90922A83221D429A00F1E1F4 /* option.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = option.c; path = ../option.c; sourceTree = "<group>"; };
90922A84221D429B00F1E1F4 /* term.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = term.c; path = ../term.c; sourceTree = "<group>"; };
90922A85221D429B00F1E1F4 /* gui.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = gui.h; path = ../gui.h; sourceTree = "<group>"; };
90922A86221D429B00F1E1F4 /* arabic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = arabic.h; path = ../arabic.h; sourceTree = "<group>"; };
90922A87221D429B00F1E1F4 /* if_tcl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = if_tcl.c; path = ../if_tcl.c; sourceTree = "<group>"; };
90922A88221D429B00F1E1F4 /* blob.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = blob.c; path = ../blob.c; sourceTree = "<group>"; };
90922A89221D429B00F1E1F4 /* if_mzsch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = if_mzsch.h; path = ../if_mzsch.h; sourceTree = "<group>"; };
@@ -379,7 +373,6 @@
90922A8C221D429B00F1E1F4 /* os_unix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = os_unix.h; path = ../os_unix.h; sourceTree = "<group>"; };
90922A8D221D429B00F1E1F4 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../main.c; sourceTree = "<group>"; };
90922A8E221D429B00F1E1F4 /* ex_cmds.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ex_cmds.h; path = ../ex_cmds.h; sourceTree = "<group>"; };
90922A8F221D429B00F1E1F4 /* popupmnu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = popupmnu.c; path = ../popupmnu.c; sourceTree = "<group>"; };
90922A90221D429B00F1E1F4 /* regexp_nfa.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = regexp_nfa.c; path = ../regexp_nfa.c; sourceTree = "<group>"; };
90922A91221D429B00F1E1F4 /* textprop.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = textprop.c; path = ../textprop.c; sourceTree = "<group>"; };
90922A92221D429B00F1E1F4 /* regexp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = regexp.h; path = ../regexp.h; sourceTree = "<group>"; };
@@ -388,9 +381,7 @@
90922A95221D429B00F1E1F4 /* crypt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = crypt.c; path = ../crypt.c; sourceTree = "<group>"; };
90922A96221D429B00F1E1F4 /* vim.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = vim.h; path = ../vim.h; sourceTree = "<group>"; };
90922A97221D429B00F1E1F4 /* syntax.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = syntax.c; path = ../syntax.c; sourceTree = "<group>"; };
90922A98221D429B00F1E1F4 /* uninstal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = uninstal.c; path = ../uninstal.c; sourceTree = "<group>"; };
90922A99221D429B00F1E1F4 /* if_xcmdsrv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = if_xcmdsrv.c; path = ../if_xcmdsrv.c; sourceTree = "<group>"; };
90922A9A221D429C00F1E1F4 /* vimio.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = vimio.h; path = ../vimio.h; sourceTree = "<group>"; };
90922A9B221D429C00F1E1F4 /* evalfunc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = evalfunc.c; path = ../evalfunc.c; sourceTree = "<group>"; };
90922A9C221D429C00F1E1F4 /* sha256.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = sha256.c; path = ../sha256.c; sourceTree = "<group>"; };
90922A9D221D429C00F1E1F4 /* screen.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = screen.c; path = ../screen.c; sourceTree = "<group>"; };
@@ -401,7 +392,6 @@
90922AA2221D429C00F1E1F4 /* misc1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = misc1.c; path = ../misc1.c; sourceTree = "<group>"; };
90922AA3221D429C00F1E1F4 /* normal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = normal.c; path = ../normal.c; sourceTree = "<group>"; };
90922AA4221D429C00F1E1F4 /* if_ole.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = if_ole.h; path = ../if_ole.h; sourceTree = "<group>"; };
90922AA5221D429C00F1E1F4 /* xpm_w32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = xpm_w32.h; path = ../xpm_w32.h; sourceTree = "<group>"; };
90922AA6221D429C00F1E1F4 /* move.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = move.c; path = ../move.c; sourceTree = "<group>"; };
90922AA7221D429C00F1E1F4 /* os_unix.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = os_unix.c; path = ../os_unix.c; sourceTree = "<group>"; };
90922AA8221D429C00F1E1F4 /* spell.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = spell.c; path = ../spell.c; sourceTree = "<group>"; };
@@ -444,6 +434,19 @@
90F84F312521F8760000268B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/MainMenu.strings; sourceTree = "<group>"; };
90F84F322521F87F0000268B /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/MainMenu.strings; sourceTree = "<group>"; };
90F84F332521F8880000268B /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/MainMenu.strings; sourceTree = "<group>"; };
95241CE12573D587001E3711 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
95241CF025749CC6001E3711 /* vim9type.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = vim9type.c; path = ../vim9type.c; sourceTree = "<group>"; };
95241CF125749CC6001E3711 /* help.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = help.c; path = ../help.c; sourceTree = "<group>"; };
95241CF225749CC6001E3711 /* gui_xim.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = gui_xim.c; path = ../gui_xim.c; sourceTree = "<group>"; };
95241CF325749CC7001E3711 /* job.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = job.c; path = ../job.c; sourceTree = "<group>"; };
95241CF425749CC7001E3711 /* textformat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = textformat.c; path = ../textformat.c; sourceTree = "<group>"; };
95241CF525749CC7001E3711 /* match.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = match.c; path = ../match.c; sourceTree = "<group>"; };
95241CF625749CC7001E3711 /* locale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = locale.c; path = ../locale.c; sourceTree = "<group>"; };
95241CF725749CC7001E3711 /* typval.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = typval.c; path = ../typval.c; sourceTree = "<group>"; };
95241CF825749CC7001E3711 /* clientserver.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = clientserver.c; path = ../clientserver.c; sourceTree = "<group>"; };
95241CF925749CC7001E3711 /* errors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = errors.h; path = ../errors.h; sourceTree = "<group>"; };
95241CFA25749CC7001E3711 /* textobject.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = textobject.c; path = ../textobject.c; sourceTree = "<group>"; };
95241CFB25749D4A001E3711 /* os_macosx.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = os_macosx.m; path = ../os_macosx.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -662,48 +665,9 @@
90922A3A221D417800F1E1F4 /* Vim Source */ = {
isa = PBXGroup;
children = (
901C070F2430C8CC00797C2A /* arglist.c */,
901C06FB2430C8C900797C2A /* bufwrite.c */,
901C06F92430C8C900797C2A /* change.c */,
901C07002430C8CA00797C2A /* cindent.c */,
901C07112430C8CC00797C2A /* clipboard.c */,
901C07042430C8CA00797C2A /* cmdexpand.c */,
901C06F82430C8C900797C2A /* cmdhist.c */,
901C06FE2430C8CA00797C2A /* debugger.c */,
901C07032430C8CA00797C2A /* drawline.c */,
901C06FD2430C8CA00797C2A /* drawscreen.c */,
901C07082430C8CB00797C2A /* evalbuffer.c */,
901C06FC2430C8CA00797C2A /* evalvars.c */,
901C06FA2430C8C900797C2A /* evalwindow.c */,
901C07192430C8CD00797C2A /* filepath.c */,
901C07122430C8CC00797C2A /* highlight.c */,
901C070A2430C8CB00797C2A /* insexpand.c */,
901C06F42430C8C800797C2A /* map.c */,
901C07152430C8CC00797C2A /* mouse.c */,
901C07162430C8CD00797C2A /* optiondefs.h */,
901C07172430C8CD00797C2A /* optionstr.c */,
901C06FF2430C8CA00797C2A /* popupmenu.c */,
901C07022430C8CA00797C2A /* popupwin.c */,
901C070B2430C8CB00797C2A /* profiler.c */,
901C07142430C8CC00797C2A /* regexp_bt.c */,
901C07062430C8CB00797C2A /* register.c */,
901C07052430C8CB00797C2A /* scriptfile.c */,
901C071A2430C8CD00797C2A /* session.c */,
901C070D2430C8CC00797C2A /* sound.c */,
901C07092430C8CB00797C2A /* spellsuggest.c */,
901C06F72430C8C900797C2A /* testing.c */,
901C06F62430C8C900797C2A /* time.c */,
901C07132430C8CC00797C2A /* uninstall.c */,
901C07012430C8CA00797C2A /* usercmd.c */,
901C070E2430C8CC00797C2A /* vim9.h */,
901C070C2430C8CB00797C2A /* vim9compile.c */,
901C07072430C8CB00797C2A /* vim9execute.c */,
901C07102430C8CC00797C2A /* vim9script.c */,
901C07182430C8CD00797C2A /* viminfo.c */,
90922ABB221D42DC00F1E1F4 /* MacVim */,
90922A66221D429800F1E1F4 /* alloc.h */,
90922A54221D429700F1E1F4 /* arabic.c */,
90922A86221D429B00F1E1F4 /* arabic.h */,
901C070F2430C8CC00797C2A /* arglist.c */,
90922AB0221D429C00F1E1F4 /* ascii.h */,
90922AA1221D429C00F1E1F4 /* autocmd.c */,
90922A65221D429800F1E1F4 /* beval.c */,
@@ -711,19 +675,33 @@
90922A88221D429B00F1E1F4 /* blob.c */,
90922A62221D429800F1E1F4 /* blowfish.c */,
90922AA9221D429C00F1E1F4 /* buffer.c */,
901C06FB2430C8C900797C2A /* bufwrite.c */,
901C06F92430C8C900797C2A /* change.c */,
90922A8A221D429B00F1E1F4 /* channel.c */,
90922A93221D429B00F1E1F4 /* charset.c */,
901C07002430C8CA00797C2A /* cindent.c */,
95241CF825749CC7001E3711 /* clientserver.c */,
901C07112430C8CC00797C2A /* clipboard.c */,
901C07042430C8CA00797C2A /* cmdexpand.c */,
901C06F82430C8C900797C2A /* cmdhist.c */,
90922A56221D429700F1E1F4 /* crypt_zip.c */,
90922A95221D429B00F1E1F4 /* crypt.c */,
901C06FE2430C8CA00797C2A /* debugger.c */,
90922A43221D429600F1E1F4 /* dict.c */,
90922AB6221D429D00F1E1F4 /* diff.c */,
90922A3E221D429500F1E1F4 /* digraph.c */,
90922AAB221D429C00F1E1F4 /* dlldata.c */,
90922A72221D429900F1E1F4 /* dosinst.c */,
90922A6C221D429900F1E1F4 /* dosinst.h */,
901C07032430C8CA00797C2A /* drawline.c */,
901C06FD2430C8CA00797C2A /* drawscreen.c */,
90922A7D221D429A00F1E1F4 /* edit.c */,
95241CF925749CC7001E3711 /* errors.h */,
90922A5B221D429700F1E1F4 /* eval.c */,
901C07082430C8CB00797C2A /* evalbuffer.c */,
90922A9B221D429C00F1E1F4 /* evalfunc.c */,
901C06FC2430C8CA00797C2A /* evalvars.c */,
901C06FA2430C8C900797C2A /* evalwindow.c */,
90922A48221D429600F1E1F4 /* ex_cmdidxs.h */,
90922AAD221D429C00F1E1F4 /* ex_cmds.c */,
90922A8E221D429B00F1E1F4 /* ex_cmds.h */,
@@ -733,6 +711,7 @@
90922A74221D429900F1E1F4 /* ex_getln.c */,
90922AAE221D429C00F1E1F4 /* feature.h */,
90922A6F221D429900F1E1F4 /* fileio.c */,
901C07192430C8CD00797C2A /* filepath.c */,
90922A80221D429A00F1E1F4 /* findfile.c */,
90922A77221D429900F1E1F4 /* fold.c */,
90922AA0221D429C00F1E1F4 /* getchar.c */,
@@ -741,12 +720,13 @@
90922A6B221D429800F1E1F4 /* gui_at_fs.c */,
90922A3F221D429500F1E1F4 /* gui_at_sb.c */,
90922A55221D429700F1E1F4 /* gui_beval.c */,
90922A44221D429600F1E1F4 /* gui_mac.c */,
95241CF225749CC6001E3711 /* gui_xim.c */,
90922A4C221D429600F1E1F4 /* gui.c */,
90922A85221D429B00F1E1F4 /* gui.h */,
90922A5A221D429700F1E1F4 /* hangulin.c */,
90922A57221D429700F1E1F4 /* hardcopy.c */,
90922A50221D429600F1E1F4 /* hashtab.c */,
95241CF125749CC6001E3711 /* help.c */,
901C07122430C8CC00797C2A /* highlight.c */,
90922A6A221D429800F1E1F4 /* if_cscope.c */,
90922A9E221D429C00F1E1F4 /* if_cscope.h */,
90922AB4221D429C00F1E1F4 /* if_lua.c */,
@@ -762,16 +742,22 @@
90922A99221D429B00F1E1F4 /* if_xcmdsrv.c */,
90922A7A221D429A00F1E1F4 /* iid_ole.c */,
90922A8B221D429B00F1E1F4 /* indent.c */,
901C070A2430C8CB00797C2A /* insexpand.c */,
90922A41221D429500F1E1F4 /* iscygpty.c */,
90922A52221D429600F1E1F4 /* iscygpty.h */,
95241CF325749CC7001E3711 /* job.c */,
90922A4F221D429600F1E1F4 /* json_test.c */,
90922A9F221D429C00F1E1F4 /* json.c */,
90922A40221D429500F1E1F4 /* keymap.h */,
90922A45221D429600F1E1F4 /* kword_test.c */,
90922A58221D429700F1E1F4 /* list.c */,
95241CF625749CC7001E3711 /* locale.c */,
90922A69221D429800F1E1F4 /* macros.h */,
90922ABB221D42DC00F1E1F4 /* MacVim */,
90922A8D221D429B00F1E1F4 /* main.c */,
901C06F42430C8C800797C2A /* map.c */,
90922A4B221D429600F1E1F4 /* mark.c */,
95241CF525749CC7001E3711 /* match.c */,
90922A7C221D429A00F1E1F4 /* mbyte.c */,
90922AB2221D429C00F1E1F4 /* memfile_test.c */,
90922A51221D429600F1E1F4 /* memfile.c */,
@@ -781,6 +767,7 @@
90922A63221D429800F1E1F4 /* message.c */,
90922AA2221D429C00F1E1F4 /* misc1.c */,
90922A3B221D429500F1E1F4 /* misc2.c */,
901C07152430C8CC00797C2A /* mouse.c */,
90922AA6221D429C00F1E1F4 /* move.c */,
90922A4A221D429600F1E1F4 /* nbdebug.c */,
90922A5E221D429700F1E1F4 /* nbdebug.h */,
@@ -789,25 +776,36 @@
90922A73221D429900F1E1F4 /* ops.c */,
90922A83221D429A00F1E1F4 /* option.c */,
90922AB1221D429C00F1E1F4 /* option.h */,
901C07162430C8CD00797C2A /* optiondefs.h */,
901C07172430C8CD00797C2A /* optionstr.c */,
90922AAF221D429C00F1E1F4 /* os_mac_conv.c */,
90922A5D221D429700F1E1F4 /* os_mac.h */,
95241CFB25749D4A001E3711 /* os_macosx.m */,
90922AA7221D429C00F1E1F4 /* os_unix.c */,
90922A8C221D429B00F1E1F4 /* os_unix.h */,
90922A8F221D429B00F1E1F4 /* popupmnu.c */,
901C06FF2430C8CA00797C2A /* popupmenu.c */,
901C07022430C8CA00797C2A /* popupwin.c */,
901C070B2430C8CB00797C2A /* profiler.c */,
90922A6E221D429900F1E1F4 /* proto.h */,
90922A68221D429800F1E1F4 /* protodef.h */,
90922A47221D429600F1E1F4 /* pty.c */,
90922A94221D429B00F1E1F4 /* quickfix.c */,
901C07142430C8CC00797C2A /* regexp_bt.c */,
90922A90221D429B00F1E1F4 /* regexp_nfa.c */,
90922AB7221D429D00F1E1F4 /* regexp.c */,
90922A92221D429B00F1E1F4 /* regexp.h */,
901C07062430C8CB00797C2A /* register.c */,
90922A9D221D429C00F1E1F4 /* screen.c */,
901C07052430C8CB00797C2A /* scriptfile.c */,
90922A7E221D429A00F1E1F4 /* search.c */,
901C071A2430C8CD00797C2A /* session.c */,
90922A9C221D429C00F1E1F4 /* sha256.c */,
90922AAC221D429C00F1E1F4 /* sign.c */,
901C070D2430C8CC00797C2A /* sound.c */,
90922AA8221D429C00F1E1F4 /* spell.c */,
90922A7B221D429A00F1E1F4 /* spell.h */,
90922AB3221D429C00F1E1F4 /* spellfile.c */,
901C07092430C8CB00797C2A /* spellsuggest.c */,
90922AB5221D429D00F1E1F4 /* structs.h */,
90922A97221D429B00F1E1F4 /* syntax.c */,
90922A60221D429800F1E1F4 /* tag.c */,
@@ -815,20 +813,28 @@
90922ABA221D429D00F1E1F4 /* term.h */,
90922AB9221D429D00F1E1F4 /* terminal.c */,
90922A64221D429800F1E1F4 /* termlib.c */,
901C06F72430C8C900797C2A /* testing.c */,
95241CF425749CC7001E3711 /* textformat.c */,
95241CFA25749CC7001E3711 /* textobject.c */,
90922A91221D429B00F1E1F4 /* textprop.c */,
901C06F62430C8C900797C2A /* time.c */,
95241CF725749CC7001E3711 /* typval.c */,
90922A76221D429900F1E1F4 /* ui.c */,
90922A7F221D429A00F1E1F4 /* undo.c */,
90922A98221D429B00F1E1F4 /* uninstal.c */,
901C07132430C8CC00797C2A /* uninstall.c */,
901C07012430C8CA00797C2A /* usercmd.c */,
90922A5C221D429700F1E1F4 /* userfunc.c */,
90922AB8221D429D00F1E1F4 /* version.c */,
90922A3D221D429500F1E1F4 /* version.h */,
90922A96221D429B00F1E1F4 /* vim.h */,
90922A9A221D429C00F1E1F4 /* vimio.h */,
901C070E2430C8CC00797C2A /* vim9.h */,
901C070C2430C8CB00797C2A /* vim9compile.c */,
901C07072430C8CB00797C2A /* vim9execute.c */,
901C07102430C8CC00797C2A /* vim9script.c */,
95241CF025749CC6001E3711 /* vim9type.c */,
901C07182430C8CD00797C2A /* viminfo.c */,
90922A81221D429A00F1E1F4 /* vimrun.c */,
90922A75221D429900F1E1F4 /* winclip.c */,
90922AAA221D429C00F1E1F4 /* window.c */,
90922A61221D429800F1E1F4 /* xpm_w32.c */,
90922AA5221D429C00F1E1F4 /* xpm_w32.h */,
);
name = "Vim Source";
sourceTree = "<group>";
@@ -885,10 +891,9 @@
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 1;
knownRegions = (
English,
Base,
"zh-Hant",
"zh-Hans",
@@ -911,6 +916,7 @@
ru,
sv,
tr,
en,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* MacVim */;
projectDirPath = "";
@@ -1111,7 +1117,7 @@
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
95241CE12573D587001E3711 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
@@ -1231,6 +1237,7 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
ENABLE_TESTABILITY = YES;
GCC_VERSION = 4.2;
@@ -1245,6 +1252,7 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
GCC_VERSION = 4.2;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+29
View File
@@ -14148,6 +14148,35 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
$as_echo_n "checking for sysinfo.uptime... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/sysinfo.h>
int
main ()
{
struct sysinfo sinfo;
long ut;
(void)sysinfo(&sinfo);
ut = sinfo.uptime;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
$as_echo_n "checking for sysconf... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+16 -4
View File
@@ -1337,7 +1337,7 @@ do_doautocmd(
void
ex_doautoall(exarg_T *eap)
{
int retval;
int retval = OK;
aco_save_T aco;
buf_T *buf;
bufref_T bufref;
@@ -1354,7 +1354,8 @@ ex_doautoall(exarg_T *eap)
*/
FOR_ALL_BUFFERS(buf)
{
if (buf->b_ml.ml_mfp != NULL)
// Only do loaded buffers and skip the current buffer, it's done last.
if (buf->b_ml.ml_mfp != NULL && buf != curbuf)
{
// find a window for this buffer and save some values
aucmd_prepbuf(&aco, buf);
@@ -1364,22 +1365,31 @@ ex_doautoall(exarg_T *eap)
retval = do_doautocmd(arg, FALSE, &did_aucmd);
if (call_do_modelines && did_aucmd)
{
// Execute the modeline settings, but don't set window-local
// options if we are using the current window for another
// buffer.
do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
}
// restore the current window
aucmd_restbuf(&aco);
// stop if there is some error or buffer was deleted
if (retval == FAIL || !bufref_valid(&bufref))
{
retval = FAIL;
break;
}
}
}
// Execute autocommands for the current buffer last.
if (retval == OK)
{
do_doautocmd(arg, FALSE, &did_aucmd);
if (call_do_modelines && did_aucmd)
do_modelines(0);
}
check_cursor(); // just in case lines got deleted
}
@@ -2167,12 +2177,14 @@ apply_autocmds_group(
while (au_pending_free_buf != NULL)
{
buf_T *b = au_pending_free_buf->b_next;
vim_free(au_pending_free_buf);
au_pending_free_buf = b;
}
while (au_pending_free_win != NULL)
{
win_T *w = au_pending_free_win->w_next;
vim_free(au_pending_free_win);
au_pending_free_win = w;
}
+5
View File
@@ -4946,6 +4946,11 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
// Don't open a file in restricted mode.
if (check_restricted() || check_secure())
return;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_string_arg(argvars, 1) == FAIL))
return;
fname = tv_get_string(&argvars[0]);
if (argvars[1].v_type == VAR_STRING)
opt = tv_get_string_buf(&argvars[1], buf);
+2 -1
View File
@@ -2005,7 +2005,8 @@ hex2nr(int c)
return c - '0';
}
#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) || defined(PROTO)
#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) \
|| defined(PROTO) || defined(FEAT_AUTOSHELLDIR)
/*
* Convert two hex characters to a byte.
* Return -1 if one of the characters is not hex.
+3 -2
View File
@@ -1020,8 +1020,9 @@ set_one_cmd_context(
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') // Allow * wild card
++p;
// a user command may contain digits
if (ASCII_ISUPPER(cmd[0]))
// A user command may contain digits.
// Include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
if (ASCII_ISUPPER(cmd[0]) || STRNCMP("vim9", cmd, 4) == 0)
while (ASCII_ISALNUM(*p) || *p == '*')
++p;
// for python 3.x: ":py3*" commands completion
+1
View File
@@ -213,6 +213,7 @@
#undef HAVE_SYSCTL
#undef HAVE_SYSINFO
#undef HAVE_SYSINFO_MEM_UNIT
#undef HAVE_SYSINFO_UPTIME
#undef HAVE_TGETENT
#undef HAVE_TOWLOWER
#undef HAVE_TOWUPPER
+14
View File
@@ -4280,6 +4280,20 @@ AC_TRY_COMPILE(
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
AC_MSG_RESULT(no))
dnl struct sysinfo may have the uptime field or not
AC_MSG_CHECKING(for sysinfo.uptime)
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
long ut;
(void)sysinfo(&sinfo);
ut = sinfo.uptime;
],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME),
AC_MSG_RESULT(no))
dnl sysconf() may exist but not support what we want to use
AC_MSG_CHECKING(for sysconf)
AC_TRY_COMPILE(
+1 -1
View File
@@ -1034,7 +1034,7 @@ win_line(
p_extra_free = alloc(MAX_MCO * fdc + 1);
if (p_extra_free != NULL)
{
n_extra = fill_foldcolumn(p_extra_free, wp,
n_extra = (int)fill_foldcolumn(p_extra_free, wp,
FALSE, lnum);
p_extra_free[n_extra] = NUL;
p_extra = p_extra_free;
+25 -6
View File
@@ -377,6 +377,20 @@ update_screen(int type_arg)
return OK;
}
/*
* Return the row for drawing the statusline and the ruler of window "wp".
*/
static int
statusline_row(win_T *wp)
{
#if defined(FEAT_PROP_POPUP)
// If the window is really zero height the winbar isn't displayed.
if (wp->w_frame->fr_height == wp->w_status_height && !popup_is_popup(wp))
return wp->w_winrow;
#endif
return W_WINROW(wp) + wp->w_height;
}
/*
* Redraw the status line of window wp.
*
@@ -401,6 +415,8 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
return;
busy = TRUE;
row = statusline_row(wp);
wp->w_redr_status = FALSE;
if (wp->w_status_height == 0)
{
@@ -500,7 +516,6 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
len = this_ru_col - 1;
}
row = W_WINROW(wp) + wp->w_height;
screen_puts(p, row, wp->w_wincol, attr);
screen_fill(row, row + 1, len + wp->w_wincol,
this_ru_col + wp->w_wincol, fillchar, fillchar, attr);
@@ -524,8 +539,7 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED)
fillchar = fillchar_status(&attr, wp);
else
fillchar = fillchar_vsep(&attr);
screen_putchar(fillchar, W_WINROW(wp) + wp->w_height, W_ENDCOL(wp),
attr);
screen_putchar(fillchar, row, W_ENDCOL(wp), attr);
}
busy = FALSE;
}
@@ -680,7 +694,7 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum)
cursor_off();
if (wp->w_status_height)
{
row = W_WINROW(wp) + wp->w_height;
row = statusline_row(wp);
fillchar = fillchar_status(&attr, wp);
off = wp->w_wincol;
width = wp->w_width;
@@ -1468,8 +1482,13 @@ win_update(win_T *wp)
wp->w_lines_valid = 0;
}
// Window is zero-height: nothing to draw.
if (wp->w_height + WINBAR_HEIGHT(wp) == 0)
// Window frame is zero-height: nothing to draw.
if (wp->w_height + WINBAR_HEIGHT(wp) == 0
|| (wp->w_frame->fr_height == wp->w_status_height
#if defined(FEAT_PROP_POPUP)
&& !popup_is_popup(wp)
#endif
))
{
wp->w_redr_type = 0;
return;
+22
View File
@@ -373,3 +373,25 @@ EXTERN char e_argument_name_shadows_existing_variable_str[]
INIT(= N_("E1167: Argument name shadows existing variable: %s"));
EXTERN char e_argument_already_declared_in_script_str[]
INIT(= N_("E1168: Argument already declared in the script: %s"));
EXTERN char e_import_as_name_not_supported_here[]
INIT(= N_("E1169: 'import * as {name}' not supported here"));
EXTERN char e_cannot_use_hash_curly_to_start_comment[]
INIT(= N_("E1170: Cannot use #{ to start a comment"));
EXTERN char e_missing_end_block[]
INIT(= N_("E1171: Missing } after inline function"));
EXTERN char e_cannot_use_default_values_in_lambda[]
INIT(= N_("E1172: Cannot use default values in a lambda"));
EXTERN char e_text_found_after_enddef_str[]
INIT(= N_("E1173: Text found after enddef: %s"));
EXTERN char e_string_required_for_argument_nr[]
INIT(= N_("E1174: String required for argument %d"));
EXTERN char e_non_empty_string_required_for_argument_nr[]
INIT(= N_("E1175: Non-empty string required for argument %d"));
EXTERN char e_misplaced_command_modifier[]
INIT(= N_("E1176: Misplaced command modifier"));
EXTERN char e_for_loop_on_str_not_supported[]
INIT(= N_("E1177: For loop on %s not supported"));
EXTERN char e_cannot_lock_unlock_local_variable[]
INIT(= N_("E1178: Cannot lock or unlock a local variable"));
EXTERN char e_failed_to_extract_pwd_from_str_check_your_shell_config[]
INIT(= N_("E1179: Failed to extract PWD from %s, check your shell's config related to OSC 7"));
+114 -10
View File
@@ -41,6 +41,8 @@ typedef struct
list_T *fi_list; // list being used
int fi_bi; // index of blob
blob_T *fi_blob; // blob being used
char_u *fi_string; // copy of string being used
int fi_byte_idx; // byte index in fi_string
} forinfo_T;
static int tv_op(typval_T *tv1, typval_T *tv2, char_u *op);
@@ -1370,7 +1372,7 @@ set_var_lval(
// handle +=, -=, *=, /=, %= and .=
di = NULL;
if (eval_variable(lp->ll_name, (int)STRLEN(lp->ll_name),
&tv, &di, TRUE, FALSE) == OK)
&tv, &di, EVAL_VAR_VERBOSE) == OK)
{
if ((di == NULL
|| (!var_check_ro(di->di_flags, lp->ll_name, FALSE)
@@ -1738,6 +1740,14 @@ eval_for_line(
}
clear_tv(&tv);
}
else if (tv.v_type == VAR_STRING)
{
fi->fi_byte_idx = 0;
fi->fi_string = tv.vval.v_string;
tv.vval.v_string = NULL;
if (fi->fi_string == NULL)
fi->fi_string = vim_strsave((char_u *)"");
}
else
{
emsg(_(e_listreq));
@@ -1790,7 +1800,25 @@ next_for_item(void *fi_void, char_u *arg)
tv.vval.v_number = blob_get(fi->fi_blob, fi->fi_bi);
++fi->fi_bi;
return ex_let_vars(arg, &tv, TRUE, fi->fi_semicolon,
fi->fi_varcount, flag, NULL) == OK;
fi->fi_varcount, flag, NULL) == OK;
}
if (fi->fi_string != NULL)
{
typval_T tv;
int len;
len = mb_ptr2len(fi->fi_string + fi->fi_byte_idx);
if (len == 0)
return FALSE;
tv.v_type = VAR_STRING;
tv.v_lock = VAR_FIXED;
tv.vval.v_string = vim_strnsave(fi->fi_string + fi->fi_byte_idx, len);
fi->fi_byte_idx += len;
result = ex_let_vars(arg, &tv, TRUE, fi->fi_semicolon,
fi->fi_varcount, flag, NULL) == OK;
vim_free(tv.vval.v_string);
return result;
}
item = fi->fi_lw.lw_item;
@@ -1800,7 +1828,7 @@ next_for_item(void *fi_void, char_u *arg)
{
fi->fi_lw.lw_item = item->li_next;
result = (ex_let_vars(arg, &item->li_tv, TRUE, fi->fi_semicolon,
fi->fi_varcount, flag, NULL) == OK);
fi->fi_varcount, flag, NULL) == OK);
}
return result;
}
@@ -1813,13 +1841,17 @@ free_for_info(void *fi_void)
{
forinfo_T *fi = (forinfo_T *)fi_void;
if (fi != NULL && fi->fi_list != NULL)
if (fi == NULL)
return;
if (fi->fi_list != NULL)
{
list_rem_watch(fi->fi_list, &fi->fi_lw);
list_unref(fi->fi_list);
}
if (fi != NULL && fi->fi_blob != NULL)
else if (fi->fi_blob != NULL)
blob_unref(fi->fi_blob);
else
vim_free(fi->fi_string);
vim_free(fi);
}
@@ -2179,8 +2211,8 @@ clear_evalarg(evalarg_T *evalarg, exarg_T *eap)
evalarg->eval_tofree = NULL;
}
vim_free(evalarg->eval_tofree_lambda);
evalarg->eval_tofree_lambda = NULL;
VIM_CLEAR(evalarg->eval_tofree_cmdline);
VIM_CLEAR(evalarg->eval_tofree_lambda);
}
}
@@ -2228,7 +2260,8 @@ eval0(
if (!aborting()
&& did_emsg == did_emsg_before
&& called_emsg == called_emsg_before
&& (flags & EVAL_CONSTANT) == 0)
&& (flags & EVAL_CONSTANT) == 0
&& (!in_vim9script() || !vim9_bad_comment(p)))
semsg(_(e_invexpr2), arg);
// Some of the expression may not have been consumed. Do not check for
@@ -3362,7 +3395,11 @@ eval7(
/*
* Dictionary: #{key: val, key: val}
*/
case '#': if (!in_vim9script() && (*arg)[1] == '{')
case '#': if (in_vim9script())
{
ret = vim9_bad_comment(*arg) ? FAIL : NOTDONE;
}
else if ((*arg)[1] == '{')
{
++*arg;
ret = eval_dict(arg, rettv, evalarg, TRUE);
@@ -3500,7 +3537,8 @@ eval7(
ret = OK;
}
else
ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE);
ret = eval_variable(s, len, rettv, NULL,
EVAL_VAR_VERBOSE + EVAL_VAR_IMPORT);
}
else
{
@@ -5260,6 +5298,9 @@ var2fpos(
return &pos;
}
if (in_vim9script() && check_for_string_arg(varp, 0) == FAIL)
return NULL;
name = tv_get_string_chk(varp);
if (name == NULL)
return NULL;
@@ -5760,6 +5801,63 @@ handle_subscript(
check_white = FALSE;
}
if (rettv->v_type == VAR_ANY)
{
char_u *exp_name;
int cc;
int idx;
ufunc_T *ufunc;
type_T *type;
// Found script from "import * as {name}", script item name must
// follow.
if (**arg != '.')
{
if (verbose)
semsg(_(e_expected_str_but_got_str), "'.'", *arg);
ret = FAIL;
break;
}
++*arg;
if (IS_WHITE_OR_NUL(**arg))
{
if (verbose)
emsg(_(e_no_white_space_allowed_after_dot));
ret = FAIL;
break;
}
// isolate the name
exp_name = *arg;
while (eval_isnamec(**arg))
++*arg;
cc = **arg;
**arg = NUL;
idx = find_exported(rettv->vval.v_number, exp_name, &ufunc, &type,
evalarg->eval_cctx, verbose);
**arg = cc;
*arg = skipwhite(*arg);
if (idx < 0 && ufunc == NULL)
{
ret = FAIL;
break;
}
if (idx >= 0)
{
scriptitem_T *si = SCRIPT_ITEM(rettv->vval.v_number);
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + idx;
copy_tv(sv->sv_tv, rettv);
}
else
{
rettv->v_type = VAR_FUNC;
rettv->vval.v_string = vim_strsave(ufunc->uf_name);
}
}
if ((**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC
|| rettv->v_type == VAR_PARTIAL))
&& (!check_white || !VIM_ISWHITE(*(*arg - 1))))
@@ -6054,6 +6152,7 @@ get_echo_attr(void)
* ":execute expr1 ..." execute the result of an expression.
* ":echomsg expr1 ..." Print a message
* ":echoerr expr1 ..." Print an error
* ":echoconsole expr1 ..." Print a message on stdout
* Each gets spaces around each argument and a newline at the end for
* echo commands
*/
@@ -6131,6 +6230,11 @@ ex_execute(exarg_T *eap)
msg_attr(ga.ga_data, echo_attr);
out_flush();
}
else if (eap->cmdidx == CMD_echoconsole)
{
ui_write(ga.ga_data, (int)STRLEN(ga.ga_data), TRUE);
ui_write((char_u *)"\r\n", 2, TRUE);
}
else if (eap->cmdidx == CMD_echoerr)
{
int save_did_emsg = did_emsg;
+2
View File
@@ -88,6 +88,8 @@ find_buffer(typval_T *avar)
if (avar->v_type == VAR_NUMBER)
buf = buflist_findnr((int)avar->vval.v_number);
else if (in_vim9script() && check_for_string_arg(avar, 0) == FAIL)
return NULL;
else if (avar->v_type == VAR_STRING && avar->vval.v_string != NULL)
{
buf = buflist_findname_exp(avar->vval.v_string);
+72 -19
View File
@@ -223,6 +223,7 @@ static void f_str2float(typval_T *argvars, typval_T *rettv);
#endif
static void f_str2list(typval_T *argvars, typval_T *rettv);
static void f_str2nr(typval_T *argvars, typval_T *rettv);
static void f_strcharlen(typval_T *argvars, typval_T *rettv);
static void f_strchars(typval_T *argvars, typval_T *rettv);
static void f_strgetchar(typval_T *argvars, typval_T *rettv);
static void f_stridx(typval_T *argvars, typval_T *rettv);
@@ -1021,7 +1022,7 @@ static funcentry_T global_functions[] =
{"getcwd", 0, 2, FEARG_1, NULL,
ret_string, f_getcwd},
{"getenv", 1, 1, FEARG_1, NULL,
ret_string, f_getenv},
ret_any, f_getenv},
{"getfontname", 0, 1, 0, NULL,
ret_string, f_getfontname},
{"getfperm", 1, 1, FEARG_1, NULL,
@@ -1572,7 +1573,9 @@ static funcentry_T global_functions[] =
ret_list_number, f_str2list},
{"str2nr", 1, 3, FEARG_1, arg3_string_nr_bool,
ret_number, f_str2nr},
{"strcharpart", 2, 3, FEARG_1, NULL,
{"strcharlen", 1, 1, FEARG_1, NULL,
ret_number, f_strcharlen},
{"strcharpart", 2, 4, FEARG_1, NULL,
ret_string, f_strcharpart},
{"strchars", 1, 2, FEARG_1, NULL,
ret_number, f_strchars},
@@ -2320,8 +2323,12 @@ f_balloon_show(typval_T *argvars, typval_T *rettv UNUSED)
}
else
{
char_u *mesg = tv_get_string_chk(&argvars[0]);
char_u *mesg;
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
mesg = tv_get_string_chk(&argvars[0]);
if (mesg != NULL)
// empty string removes the balloon
post_balloon(balloonEval, *mesg == NUL ? NULL : mesg, NULL);
@@ -2335,8 +2342,11 @@ f_balloon_split(typval_T *argvars, typval_T *rettv UNUSED)
{
if (rettv_list_alloc(rettv) == OK)
{
char_u *msg = tv_get_string_chk(&argvars[0]);
char_u *msg;
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
msg = tv_get_string_chk(&argvars[0]);
if (msg != NULL)
{
pumitem_T *array;
@@ -2511,6 +2521,8 @@ f_changenr(typval_T *argvars UNUSED, typval_T *rettv)
static void
f_char2nr(typval_T *argvars, typval_T *rettv)
{
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
if (has_mbyte)
{
int utf8 = 0;
@@ -2675,11 +2687,16 @@ f_confirm(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
char_u *typestr;
int error = FALSE;
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
message = tv_get_string_chk(&argvars[0]);
if (message == NULL)
error = TRUE;
if (argvars[1].v_type != VAR_UNKNOWN)
{
if (in_vim9script() && check_for_string_arg(argvars, 1) == FAIL)
return;
buttons = tv_get_string_buf_chk(&argvars[1], buf);
if (buttons == NULL)
error = TRUE;
@@ -2688,6 +2705,8 @@ f_confirm(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
def = (int)tv_get_number_chk(&argvars[2], &error);
if (argvars[3].v_type != VAR_UNKNOWN)
{
if (in_vim9script() && check_for_string_arg(argvars, 3) == FAIL)
return;
typestr = tv_get_string_buf_chk(&argvars[3], buf2);
if (typestr == NULL)
error = TRUE;
@@ -7934,7 +7953,7 @@ f_screenstring(typval_T *argvars, typval_T *rettv)
c = ScreenLines[off];
buflen += mb_char2bytes(c, buf);
if (enc_utf8)
if (enc_utf8 && ScreenLinesUC[off] != 0)
for (i = 0; i < Screen_mco && ScreenLinesC[i][off] != 0; ++i)
buflen += mb_char2bytes(ScreenLinesC[i][off], buf + buflen);
@@ -9271,31 +9290,45 @@ f_strlen(typval_T *argvars, typval_T *rettv)
tv_get_string(&argvars[0])));
}
static void
strchar_common(typval_T *argvars, typval_T *rettv, int skipcc)
{
char_u *s = tv_get_string(&argvars[0]);
varnumber_T len = 0;
int (*func_mb_ptr2char_adv)(char_u **pp);
func_mb_ptr2char_adv = skipcc ? mb_ptr2char_adv : mb_cptr2char_adv;
while (*s != NUL)
{
func_mb_ptr2char_adv(&s);
++len;
}
rettv->vval.v_number = len;
}
/*
* "strcharlen()" function
*/
static void
f_strcharlen(typval_T *argvars, typval_T *rettv)
{
strchar_common(argvars, rettv, TRUE);
}
/*
* "strchars()" function
*/
static void
f_strchars(typval_T *argvars, typval_T *rettv)
{
char_u *s = tv_get_string(&argvars[0]);
varnumber_T skipcc = FALSE;
varnumber_T len = 0;
int (*func_mb_ptr2char_adv)(char_u **pp);
if (argvars[1].v_type != VAR_UNKNOWN)
skipcc = tv_get_bool(&argvars[1]);
if (skipcc < 0 || skipcc > 1)
semsg(_(e_using_number_as_bool_nr), skipcc);
else
{
func_mb_ptr2char_adv = skipcc ? mb_ptr2char_adv : mb_cptr2char_adv;
while (*s != NUL)
{
func_mb_ptr2char_adv(&s);
++len;
}
rettv->vval.v_number = len;
}
strchar_common(argvars, rettv, skipcc);
}
/*
@@ -9334,6 +9367,7 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
int nchar;
int nbyte = 0;
int charlen;
int skipcc = FALSE;
int len = 0;
int slen;
int error = FALSE;
@@ -9344,10 +9378,24 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
nchar = (int)tv_get_number_chk(&argvars[1], &error);
if (!error)
{
if (argvars[2].v_type != VAR_UNKNOWN
&& argvars[3].v_type != VAR_UNKNOWN)
{
skipcc = tv_get_bool(&argvars[3]);
if (skipcc < 0 || skipcc > 1)
{
semsg(_(e_using_number_as_bool_nr), skipcc);
return;
}
}
if (nchar > 0)
while (nchar > 0 && nbyte < slen)
{
nbyte += MB_CPTR2LEN(p + nbyte);
if (skipcc)
nbyte += mb_ptr2len(p + nbyte);
else
nbyte += MB_CPTR2LEN(p + nbyte);
--nchar;
}
else
@@ -9362,7 +9410,12 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
if (off < 0)
len += 1;
else
len += MB_CPTR2LEN(p + off);
{
if (skipcc)
len += mb_ptr2len(p + off);
else
len += MB_CPTR2LEN(p + off);
}
--charlen;
}
}
+72 -37
View File
@@ -321,7 +321,8 @@ garbage_collect_scriptvars(int copyID)
{
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + idx;
abort = abort || set_ref_in_item(sv->sv_tv, copyID, NULL, NULL);
if (sv->sv_name != NULL)
abort = abort || set_ref_in_item(sv->sv_tv, copyID, NULL, NULL);
}
}
@@ -790,8 +791,11 @@ ex_let(exarg_T *eap)
{
if (vim9script)
{
// Vim9 declaration ":var name: type"
arg = vim9_declare_scriptvar(eap, arg);
if (!ends_excmd2(eap->cmd, skipwhite(argend)))
semsg(_(e_trailing_arg), argend);
else
// Vim9 declaration ":var name: type"
arg = vim9_declare_scriptvar(eap, arg);
}
else
{
@@ -1220,7 +1224,8 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
arg = skipwhite(arg);
if (tofree != NULL)
name = tofree;
if (eval_variable(name, len, &tv, NULL, TRUE, FALSE) == FAIL)
if (eval_variable(name, len, &tv, NULL,
EVAL_VAR_VERBOSE) == FAIL)
error = TRUE;
else
{
@@ -2540,6 +2545,8 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
/*
* Get the value of internal variable "name".
* If "flags" has EVAL_VAR_IMPORT may return a VAR_ANY with v_number set to the
* imported script ID.
* Return OK or FAIL. If OK is returned "rettv" must be cleared.
*/
int
@@ -2548,12 +2555,11 @@ eval_variable(
int len, // length of "name"
typval_T *rettv, // NULL when only checking existence
dictitem_T **dip, // non-NULL when typval's dict item is needed
int verbose, // may give error message
int no_autoload) // do not use script autoloading
int flags) // EVAL_VAR_ flags
{
int ret = OK;
typval_T *tv = NULL;
int foundFunc = FALSE;
int found = FALSE;
dictitem_T *v;
int cc;
@@ -2562,7 +2568,7 @@ eval_variable(
name[len] = NUL;
// Check for user-defined variables.
v = find_var(name, NULL, no_autoload);
v = find_var(name, NULL, flags & EVAL_VAR_NOAUTOLOAD);
if (v != NULL)
{
tv = &v->di_tv;
@@ -2582,7 +2588,7 @@ eval_variable(
{
if (import->imp_funcname != NULL)
{
foundFunc = TRUE;
found = TRUE;
if (rettv != NULL)
{
rettv->v_type = VAR_FUNC;
@@ -2591,8 +2597,21 @@ eval_variable(
}
else if (import->imp_flags & IMP_FLAGS_STAR)
{
emsg("Sorry, 'import * as X' not implemented yet");
ret = FAIL;
if ((flags & EVAL_VAR_IMPORT) == 0)
{
if (flags & EVAL_VAR_VERBOSE)
emsg(_(e_import_as_name_not_supported_here));
ret = FAIL;
}
else
{
if (rettv != NULL)
{
rettv->v_type = VAR_ANY;
rettv->vval.v_number = import->imp_sid;
}
found = TRUE;
}
}
else
{
@@ -2608,7 +2627,7 @@ eval_variable(
if (ufunc != NULL)
{
foundFunc = TRUE;
found = TRUE;
if (rettv != NULL)
{
rettv->v_type = VAR_FUNC;
@@ -2618,11 +2637,11 @@ eval_variable(
}
}
if (!foundFunc)
if (!found)
{
if (tv == NULL)
{
if (rettv != NULL && verbose)
if (rettv != NULL && (flags & EVAL_VAR_VERBOSE))
semsg(_(e_undefined_variable_str), name);
ret = FAIL;
}
@@ -2791,12 +2810,15 @@ get_script_local_ht(void)
/*
* Look for "name[len]" in script-local variables and functions.
* When "cmd" is TRUE it must look like a command, a function must be followed
* by "(" or "->".
* Return OK when found, FAIL when not found.
*/
int
lookup_scriptitem(
char_u *name,
size_t len,
int cmd,
cctx_T *dummy UNUSED)
{
hashtab_T *ht = get_script_local_ht();
@@ -2831,19 +2853,26 @@ lookup_scriptitem(
if (p != buffer)
vim_free(p);
// Find a function, so that a following "->" works.
// When used as a command require "(" or "->" to follow, "Cmd" is a user
// command while "Cmd()" is a function call.
if (res != OK)
{
// Find a function, so that a following "->" works. Skip "g:" before a
// function name.
// Do not check for an internal function, since it might also be a
// valid command, such as ":split" versuse "split()".
if (name[0] == 'g' && name[1] == ':')
p = skipwhite(name + len);
if (!cmd || name[len] == '(' || (p[0] == '-' && p[1] == '>'))
{
is_global = TRUE;
fname = name + 2;
// Do not check for an internal function, since it might also be a
// valid command, such as ":split" versus "split()".
// Skip "g:" before a function name.
if (name[0] == 'g' && name[1] == ':')
{
is_global = TRUE;
fname = name + 2;
}
if (find_func(fname, is_global, NULL) != NULL)
res = OK;
}
if (find_func(fname, is_global, NULL) != NULL)
res = OK;
}
return res;
@@ -3141,6 +3170,7 @@ set_var_const(
hashtab_T *ht;
int is_script_local;
int vim9script = in_vim9script();
int var_in_vim9script;
ht = find_var_ht(name, &varname);
if (ht == NULL || *varname == NUL)
@@ -3159,6 +3189,7 @@ set_var_const(
vim9_declare_error(name);
goto failed;
}
var_in_vim9script = is_script_local && current_script_is_vim9();
di = find_var_in_ht(ht, 0, varname, TRUE);
@@ -3190,16 +3221,17 @@ set_var_const(
goto failed;
}
if (is_script_local && vim9script)
if (is_script_local && vim9script
&& (flags & (ASSIGN_NO_DECL | ASSIGN_DECL)) == 0)
{
semsg(_(e_redefining_script_item_str), name);
goto failed;
}
if (var_in_vim9script)
{
where_T where;
if ((flags & (ASSIGN_NO_DECL | ASSIGN_DECL)) == 0)
{
semsg(_(e_redefining_script_item_str), name);
goto failed;
}
// check the type and adjust to bool if needed
where.wt_index = var_idx;
where.wt_variable = TRUE;
@@ -3217,7 +3249,7 @@ set_var_const(
// A Vim9 script-local variable is also present in sn_all_vars and
// sn_var_vals. It may set "type" from "tv".
if (is_script_local && vim9script)
if (var_in_vim9script)
update_vim9_script_var(FALSE, di, flags, tv, &type);
}
@@ -3274,14 +3306,14 @@ set_var_const(
{
// Item not found, check if a function already exists.
if (is_script_local && (flags & (ASSIGN_NO_DECL | ASSIGN_DECL)) == 0
&& lookup_scriptitem(name, STRLEN(name), NULL) == OK)
&& lookup_scriptitem(name, STRLEN(name), FALSE, NULL) == OK)
{
semsg(_(e_redefining_script_item_str), name);
goto failed;
}
// add a new variable
if (vim9script && is_script_local && (flags & ASSIGN_NO_DECL))
if (var_in_vim9script && (flags & ASSIGN_NO_DECL))
{
semsg(_(e_unknown_variable_str), name);
goto failed;
@@ -3315,7 +3347,7 @@ set_var_const(
// A Vim9 script-local variable is also added to sn_all_vars and
// sn_var_vals. It may set "type" from "tv".
if (is_script_local && vim9script)
if (var_in_vim9script)
update_vim9_script_var(TRUE, di, flags, tv, &type);
}
@@ -3426,8 +3458,10 @@ var_wrong_func_name(
char_u *name, // points to start of variable name
int new_var) // TRUE when creating the variable
{
// Allow for w: b: s: and t:.
if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':')
// Allow for w: b: s: and t:. In Vim9 script s: is not allowed, because
// the name can be used without the s: prefix.
if (!((vim_strchr((char_u *)"wbt", name[0]) != NULL
|| (!in_vim9script() && name[0] == 's')) && name[1] == ':')
&& !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
? name[2] : name[0]))
{
@@ -3696,7 +3730,8 @@ var_exists(char_u *var)
{
if (tofree != NULL)
name = tofree;
n = (eval_variable(name, len, &tv, NULL, FALSE, TRUE) == OK);
n = (eval_variable(name, len, &tv, NULL,
EVAL_VAR_NOAUTOLOAD + EVAL_VAR_IMPORT) == OK);
if (n)
{
// handle d.key, l[idx], f(expr)
+14 -7
View File
@@ -1007,18 +1007,25 @@ f_winnr(typval_T *argvars UNUSED, typval_T *rettv)
f_winrestcmd(typval_T *argvars UNUSED, typval_T *rettv)
{
win_T *wp;
int winnr = 1;
int i;
int winnr;
garray_T ga;
char_u buf[50];
ga_init2(&ga, (int)sizeof(char), 70);
FOR_ALL_WINDOWS(wp)
// Do this twice to handle some window layouts properly.
for (i = 0; i < 2; ++i)
{
sprintf((char *)buf, ":%dresize %d|", winnr, wp->w_height);
ga_concat(&ga, buf);
sprintf((char *)buf, "vert :%dresize %d|", winnr, wp->w_width);
ga_concat(&ga, buf);
++winnr;
winnr = 1;
FOR_ALL_WINDOWS(wp)
{
sprintf((char *)buf, ":%dresize %d|", winnr, wp->w_height);
ga_concat(&ga, buf);
sprintf((char *)buf, "vert :%dresize %d|", winnr, wp->w_width);
ga_concat(&ga, buf);
++winnr;
}
}
ga_append(&ga, NUL);
+23 -23
View File
@@ -10,27 +10,27 @@ static const unsigned short cmdidxs1[26] =
/* c */ 43,
/* d */ 109,
/* e */ 134,
/* f */ 157,
/* g */ 174,
/* h */ 180,
/* i */ 189,
/* j */ 208,
/* k */ 210,
/* l */ 215,
/* m */ 277,
/* n */ 297,
/* o */ 317,
/* p */ 329,
/* q */ 368,
/* r */ 371,
/* s */ 391,
/* t */ 460,
/* u */ 505,
/* v */ 516,
/* w */ 537,
/* x */ 551,
/* y */ 561,
/* z */ 562
/* f */ 158,
/* g */ 175,
/* h */ 181,
/* i */ 190,
/* j */ 209,
/* k */ 211,
/* l */ 216,
/* m */ 278,
/* n */ 298,
/* o */ 318,
/* p */ 330,
/* q */ 369,
/* r */ 372,
/* s */ 392,
/* t */ 461,
/* u */ 506,
/* v */ 517,
/* w */ 538,
/* x */ 552,
/* y */ 562,
/* z */ 563
};
/*
@@ -45,7 +45,7 @@ static const unsigned char cmdidxs2[26][26] =
/* b */ { 2, 0, 0, 5, 6, 8, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 0, 14, 0, 0, 0, 0, 23, 0, 0, 0 },
/* c */ { 3, 12, 16, 18, 20, 22, 25, 0, 0, 0, 0, 33, 37, 40, 46, 56, 58, 59, 60, 0, 62, 0, 65, 0, 0, 0 },
/* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 8, 18, 0, 19, 0, 0, 20, 0, 0, 22, 23, 0, 0, 0, 0, 0, 0, 0 },
/* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 17, 0, 18, 0, 0 },
/* e */ { 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 8, 10, 11, 0, 0, 0, 0, 0, 0, 0, 18, 0, 19, 0, 0 },
/* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0 },
/* g */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 4, 5, 0, 0, 0, 0 },
/* h */ { 5, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -69,4 +69,4 @@ static const unsigned char cmdidxs2[26][26] =
/* z */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
static const int command_count = 577;
static const int command_count = 578;
+3
View File
@@ -530,6 +530,9 @@ EXCMD(CMD_echohl, "echohl", ex_echohl,
EXCMD(CMD_echomsg, "echomsg", ex_execute,
EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_echoconsole, "echoconsole", ex_execute,
EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_echon, "echon", ex_echo,
EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
+114 -52
View File
@@ -2690,6 +2690,58 @@ ex_errmsg(char *msg, char_u *arg)
return ex_error_buf;
}
/*
* Check for an Ex command with optional tail.
* If there is a match advance "pp" to the argument and return TRUE.
* If "noparen" is TRUE do not recognize the command followed by "(".
*/
static int
checkforcmd_opt(
char_u **pp, // start of command
char *cmd, // name of command
int len, // required length
int noparen)
{
int i;
for (i = 0; cmd[i] != NUL; ++i)
if (((char_u *)cmd)[i] != (*pp)[i])
break;
if (i >= len && !isalpha((*pp)[i])
&& (*pp)[i] != '_' && (!noparen || (*pp)[i] != '('))
{
*pp = skipwhite(*pp + i);
return TRUE;
}
return FALSE;
}
/*
* Check for an Ex command with optional tail.
* If there is a match advance "pp" to the argument and return TRUE.
*/
int
checkforcmd(
char_u **pp, // start of command
char *cmd, // name of command
int len) // required length
{
return checkforcmd_opt(pp, cmd, len, FALSE);
}
/*
* Check for an Ex command with optional tail, not followed by "(".
* If there is a match advance "pp" to the argument and return TRUE.
*/
static int
checkforcmd_noparen(
char_u **pp, // start of command
char *cmd, // name of command
int len) // required length
{
return checkforcmd_opt(pp, cmd, len, TRUE);
}
/*
* Parse and skip over command modifiers:
* - update eap->cmd
@@ -2776,51 +2828,51 @@ parse_command_modifiers(
switch (*p)
{
// When adding an entry, also modify cmd_exists().
case 'a': if (!checkforcmd(&eap->cmd, "aboveleft", 3))
case 'a': if (!checkforcmd_noparen(&eap->cmd, "aboveleft", 3))
break;
cmod->cmod_split |= WSP_ABOVE;
continue;
case 'b': if (checkforcmd(&eap->cmd, "belowright", 3))
case 'b': if (checkforcmd_noparen(&eap->cmd, "belowright", 3))
{
cmod->cmod_split |= WSP_BELOW;
continue;
}
if (checkforcmd(&eap->cmd, "browse", 3))
if (checkforcmd_opt(&eap->cmd, "browse", 3, TRUE))
{
#ifdef FEAT_BROWSE_CMD
cmod->cmod_flags |= CMOD_BROWSE;
#endif
continue;
}
if (!checkforcmd(&eap->cmd, "botright", 2))
if (!checkforcmd_noparen(&eap->cmd, "botright", 2))
break;
cmod->cmod_split |= WSP_BOT;
continue;
case 'c': if (!checkforcmd(&eap->cmd, "confirm", 4))
case 'c': if (!checkforcmd_opt(&eap->cmd, "confirm", 4, TRUE))
break;
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
cmod->cmod_flags |= CMOD_CONFIRM;
#endif
continue;
case 'k': if (checkforcmd(&eap->cmd, "keepmarks", 3))
case 'k': if (checkforcmd_noparen(&eap->cmd, "keepmarks", 3))
{
cmod->cmod_flags |= CMOD_KEEPMARKS;
continue;
}
if (checkforcmd(&eap->cmd, "keepalt", 5))
if (checkforcmd_noparen(&eap->cmd, "keepalt", 5))
{
cmod->cmod_flags |= CMOD_KEEPALT;
continue;
}
if (checkforcmd(&eap->cmd, "keeppatterns", 5))
if (checkforcmd_noparen(&eap->cmd, "keeppatterns", 5))
{
cmod->cmod_flags |= CMOD_KEEPPATTERNS;
continue;
}
if (!checkforcmd(&eap->cmd, "keepjumps", 5))
if (!checkforcmd_noparen(&eap->cmd, "keepjumps", 5))
break;
cmod->cmod_flags |= CMOD_KEEPJUMPS;
continue;
@@ -2829,7 +2881,7 @@ parse_command_modifiers(
{
char_u *reg_pat;
if (!checkforcmd(&p, "filter", 4)
if (!checkforcmd_noparen(&p, "filter", 4)
|| *p == NUL || ends_excmd(*p))
break;
if (*p == '!')
@@ -2863,45 +2915,45 @@ parse_command_modifiers(
}
// ":hide" and ":hide | cmd" are not modifiers
case 'h': if (p != eap->cmd || !checkforcmd(&p, "hide", 3)
case 'h': if (p != eap->cmd || !checkforcmd_noparen(&p, "hide", 3)
|| *p == NUL || ends_excmd(*p))
break;
eap->cmd = p;
cmod->cmod_flags |= CMOD_HIDE;
continue;
case 'l': if (checkforcmd(&eap->cmd, "lockmarks", 3))
case 'l': if (checkforcmd_noparen(&eap->cmd, "lockmarks", 3))
{
cmod->cmod_flags |= CMOD_LOCKMARKS;
continue;
}
if (!checkforcmd(&eap->cmd, "leftabove", 5))
if (!checkforcmd_noparen(&eap->cmd, "leftabove", 5))
break;
cmod->cmod_split |= WSP_ABOVE;
continue;
case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3))
case 'n': if (checkforcmd_noparen(&eap->cmd, "noautocmd", 3))
{
cmod->cmod_flags |= CMOD_NOAUTOCMD;
continue;
}
if (!checkforcmd(&eap->cmd, "noswapfile", 3))
if (!checkforcmd_noparen(&eap->cmd, "noswapfile", 3))
break;
cmod->cmod_flags |= CMOD_NOSWAPFILE;
continue;
case 'r': if (!checkforcmd(&eap->cmd, "rightbelow", 6))
case 'r': if (!checkforcmd_noparen(&eap->cmd, "rightbelow", 6))
break;
cmod->cmod_split |= WSP_BELOW;
continue;
case 's': if (checkforcmd(&eap->cmd, "sandbox", 3))
case 's': if (checkforcmd_noparen(&eap->cmd, "sandbox", 3))
{
cmod->cmod_flags |= CMOD_SANDBOX;
continue;
}
if (!checkforcmd(&eap->cmd, "silent", 3))
if (!checkforcmd_noparen(&eap->cmd, "silent", 3))
break;
cmod->cmod_flags |= CMOD_SILENT;
if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1]))
@@ -2912,7 +2964,7 @@ parse_command_modifiers(
}
continue;
case 't': if (checkforcmd(&p, "tab", 3))
case 't': if (checkforcmd_noparen(&p, "tab", 3))
{
if (!skip_only)
{
@@ -2934,22 +2986,22 @@ parse_command_modifiers(
eap->cmd = p;
continue;
}
if (!checkforcmd(&eap->cmd, "topleft", 2))
if (!checkforcmd_noparen(&eap->cmd, "topleft", 2))
break;
cmod->cmod_split |= WSP_TOP;
continue;
case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3))
case 'u': if (!checkforcmd_noparen(&eap->cmd, "unsilent", 3))
break;
cmod->cmod_flags |= CMOD_UNSILENT;
continue;
case 'v': if (checkforcmd(&eap->cmd, "vertical", 4))
case 'v': if (checkforcmd_noparen(&eap->cmd, "vertical", 4))
{
cmod->cmod_split |= WSP_VERT;
continue;
}
if (checkforcmd(&eap->cmd, "vim9cmd", 4))
if (checkforcmd_noparen(&eap->cmd, "vim9cmd", 4))
{
if (ends_excmd2(p, eap->cmd))
{
@@ -2960,7 +3012,7 @@ parse_command_modifiers(
cmod->cmod_flags |= CMOD_VIM9CMD;
continue;
}
if (!checkforcmd(&p, "verbose", 4))
if (!checkforcmd_noparen(&p, "verbose", 4))
break;
if (vim_isdigit(*eap->cmd))
cmod->cmod_verbose = atoi((char *)eap->cmd);
@@ -2975,6 +3027,33 @@ parse_command_modifiers(
return OK;
}
/*
* Return TRUE if "cmod" has anything set.
*/
int
has_cmdmod(cmdmod_T *cmod)
{
return cmod->cmod_flags != 0
|| cmod->cmod_split != 0
|| cmod->cmod_verbose != 0
|| cmod->cmod_tab != 0
|| cmod->cmod_filter_regmatch.regprog != NULL;
}
/*
* If Vim9 script and "cmdmod" has anything set give an error and return TRUE.
*/
int
cmdmod_error(void)
{
if (in_vim9script() && has_cmdmod(&cmdmod))
{
emsg(_(e_misplaced_command_modifier));
return TRUE;
}
return FALSE;
}
/*
* Apply the command modifiers. Saves current state in "cmdmod", call
* undo_cmdmod() later.
@@ -3230,29 +3309,6 @@ parse_cmd_address(exarg_T *eap, char **errormsg, int silent)
return OK;
}
/*
* Check for an Ex command with optional tail.
* If there is a match advance "pp" to the argument and return TRUE.
*/
int
checkforcmd(
char_u **pp, // start of command
char *cmd, // name of command
int len) // required length
{
int i;
for (i = 0; cmd[i] != NUL; ++i)
if (((char_u *)cmd)[i] != (*pp)[i])
break;
if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_')
{
*pp = skipwhite(*pp + i);
return TRUE;
}
return FALSE;
}
/*
* Append "cmd" to the error message in IObuff.
* Takes care of limiting the length and handling 0xa0, which would be
@@ -3317,7 +3373,7 @@ skip_option_env_lead(char_u *start)
find_ex_command(
exarg_T *eap,
int *full UNUSED,
int (*lookup)(char_u *, size_t, cctx_T *) UNUSED,
int (*lookup)(char_u *, size_t, int cmd, cctx_T *) UNUSED,
cctx_T *cctx UNUSED)
{
int len;
@@ -3436,7 +3492,7 @@ find_ex_command(
|| *eap->cmd == '&'
|| *eap->cmd == '$'
|| *eap->cmd == '@'
|| lookup(eap->cmd, p - eap->cmd, cctx) == OK)
|| lookup(eap->cmd, p - eap->cmd, TRUE, cctx) == OK)
{
eap->cmdidx = CMD_var;
return eap->cmd;
@@ -3455,7 +3511,7 @@ find_ex_command(
// If it is an ID it might be a variable with an operator on the next
// line, if the variable exists it can't be an Ex command.
if (p > eap->cmd && ends_excmd(*skipwhite(p))
&& (lookup(eap->cmd, p - eap->cmd, cctx) == OK
&& (lookup(eap->cmd, p - eap->cmd, TRUE, cctx) == OK
|| (ASCII_ISALPHA(eap->cmd[0]) && eap->cmd[1] == ':')))
{
eap->cmdidx = CMD_eval;
@@ -3503,7 +3559,7 @@ find_ex_command(
}
else if (*p == '9' && STRNCMP("vim9", eap->cmd, 4) == 0)
{
// include "9" for "vim9script"
// include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
++p;
while (ASCII_ISALPHA(*p))
++p;
@@ -5240,7 +5296,9 @@ ends_excmd2(char_u *cmd_start UNUSED, char_u *cmd)
return TRUE;
#ifdef FEAT_EVAL
if (in_vim9script())
return c == '#' && (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
// # starts a comment, #{ might be a mistake, #{{ can start a fold
return c == '#' && (cmd[1] != '{' || cmd[2] == '{')
&& (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
#endif
return c == '"';
}
@@ -6615,6 +6673,10 @@ ex_open(exarg_T *eap)
regmatch_T regmatch;
char_u *p;
#ifdef FEAT_EVAL
if (not_in_vim9(eap) == FAIL)
return;
#endif
curwin->w_cursor.lnum = eap->line2;
beginline(BL_SOL | BL_FIX);
if (*eap->arg == '/')
+48 -7
View File
@@ -1011,6 +1011,8 @@ ex_endif(exarg_T *eap)
{
cstack_T *cstack = eap->cstack;
if (cmdmod_error())
return;
did_endif = TRUE;
if (cstack->cs_idx < 0
|| (cstack->cs_flags[cstack->cs_idx]
@@ -1152,6 +1154,32 @@ ex_while(exarg_T *eap)
++cstack->cs_looplevel;
cstack->cs_line[cstack->cs_idx] = -1;
}
else
{
if (in_vim9script() && SCRIPT_ID_VALID(current_sctx.sc_sid))
{
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
int i;
// Any variables defined in the previous round are no longer
// visible.
for (i = cstack->cs_script_var_len[cstack->cs_idx];
i < si->sn_var_vals.ga_len; ++i)
{
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + i;
// sv_name is set to NULL if it was already removed. This
// happens when it was defined in an inner block and no
// functions were defined there.
if (sv->sv_name != NULL)
// Remove a variable declared inside the block, if it
// still exists, from sn_vars.
hide_script_var(si, i, FALSE);
}
cstack->cs_script_var_len[cstack->cs_idx] =
si->sn_var_vals.ga_len;
}
}
cstack->cs_flags[cstack->cs_idx] =
eap->cmdidx == CMD_while ? CSF_WHILE : CSF_FOR;
@@ -1173,6 +1201,9 @@ ex_while(exarg_T *eap)
void *fi;
evalarg_T evalarg;
/*
* ":for var in list-expr"
*/
CLEAR_FIELD(evalarg);
evalarg.eval_flags = skip ? 0 : EVAL_EVALUATE;
if (getline_equal(eap->getline, eap->cookie, getsourceline))
@@ -1181,9 +1212,6 @@ ex_while(exarg_T *eap)
evalarg.eval_cookie = eap->cookie;
}
/*
* ":for var in list-expr"
*/
if ((cstack->cs_lflags & CSL_HAD_LOOP) != 0)
{
// Jumping here from a ":continue" or ":endfor": use the
@@ -1314,6 +1342,9 @@ ex_endwhile(exarg_T *eap)
int csf;
int fl;
if (cmdmod_error())
return;
if (eap->cmdidx == CMD_endwhile)
{
err = e_while;
@@ -1379,10 +1410,8 @@ ex_endwhile(exarg_T *eap)
&& dbg_check_skipped(eap))
(void)do_intthrow(cstack);
/*
* Set loop flag, so do_cmdline() will jump back to the matching
* ":while" or ":for".
*/
// Set loop flag, so do_cmdline() will jump back to the matching
// ":while" or ":for".
cstack->cs_lflags |= CSL_HAD_ENDLOOP;
}
}
@@ -1539,6 +1568,9 @@ ex_try(exarg_T *eap)
int skip;
cstack_T *cstack = eap->cstack;
if (cmdmod_error())
return;
if (cstack->cs_idx == CSTACK_LEN - 1)
eap->errmsg = _("E601: :try nesting too deep");
else
@@ -1617,6 +1649,9 @@ ex_catch(exarg_T *eap)
cstack_T *cstack = eap->cstack;
char_u *pat;
if (cmdmod_error())
return;
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
{
eap->errmsg = _(e_catch);
@@ -1777,6 +1812,9 @@ ex_finally(exarg_T *eap)
int pending = CSTP_NONE;
cstack_T *cstack = eap->cstack;
if (cmdmod_error())
return;
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
eap->errmsg = _(e_finally);
else
@@ -1906,6 +1944,9 @@ ex_endtry(exarg_T *eap)
void *rettv = NULL;
cstack_T *cstack = eap->cstack;
if (cmdmod_error())
return;
if (cstack->cs_trylevel <= 0 || cstack->cs_idx < 0)
eap->errmsg = _(e_no_endtry);
else
+6
View File
@@ -1165,6 +1165,12 @@
# define FEAT_SYN_HL
#endif
/*
* +autoshelldir 'autoshelldir' option.
*/
#if defined(FEAT_TERMINAL)
# define FEAT_AUTOSHELLDIR
#endif
/*
* +textprop and +popupwin Text PROPerties and POPUP windows
*/
+20 -11
View File
@@ -788,9 +788,13 @@ f_chdir(typval_T *argvars, typval_T *rettv)
rettv->vval.v_string = NULL;
if (argvars[0].v_type != VAR_STRING)
{
// Returning an empty string means it failed.
// No error message, for historic reasons.
if (in_vim9script())
(void) check_for_string_arg(argvars, 0);
return;
}
// Return the current directory
cwd = alloc(MAXPATHL);
@@ -861,7 +865,7 @@ f_delete(typval_T *argvars, typval_T *rettv)
void
f_executable(typval_T *argvars, typval_T *rettv)
{
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
// Check in $PATH and also check directly if there is a directory name.
@@ -876,7 +880,7 @@ f_exepath(typval_T *argvars, typval_T *rettv)
{
char_u *p = NULL;
if (in_vim9script() && check_for_nonempty_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_nonempty_string_arg(argvars, 0) == FAIL)
return;
(void)mch_can_exe(tv_get_string(&argvars[0]), &p, TRUE);
rettv->v_type = VAR_STRING;
@@ -893,7 +897,7 @@ f_filereadable(typval_T *argvars, typval_T *rettv)
char_u *p;
int n;
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
#ifndef O_NONBLOCK
# define O_NONBLOCK 0
@@ -918,7 +922,7 @@ f_filereadable(typval_T *argvars, typval_T *rettv)
void
f_filewritable(typval_T *argvars, typval_T *rettv)
{
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
rettv->vval.v_number = filewritable(tv_get_string(&argvars[0]));
}
@@ -942,7 +946,7 @@ findfilendir(
rettv->vval.v_string = NULL;
rettv->v_type = VAR_STRING;
if (in_vim9script() && check_for_nonempty_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_nonempty_string_arg(argvars, 0) == FAIL)
return;
#ifdef FEAT_SEARCHPATH
@@ -1023,8 +1027,8 @@ f_fnamemodify(typval_T *argvars, typval_T *rettv)
char_u *fbuf = NULL;
char_u buf[NUMBUFLEN];
if (in_vim9script() && (check_for_string(&argvars[0]) == FAIL
|| check_for_string(&argvars[1]) == FAIL))
if (in_vim9script() && (check_for_string_arg(argvars, 0) == FAIL
|| check_for_string_arg(argvars, 1) == FAIL))
return;
fname = tv_get_string_chk(&argvars[0]);
mods = tv_get_string_buf_chk(&argvars[1], buf);
@@ -1135,7 +1139,7 @@ f_getfperm(typval_T *argvars, typval_T *rettv)
char_u *perm = NULL;
char_u permbuf[] = "---------";
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
fname = tv_get_string(&argvars[0]);
@@ -1154,7 +1158,7 @@ f_getfsize(typval_T *argvars, typval_T *rettv)
char_u *fname;
stat_T st;
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
fname = tv_get_string(&argvars[0]);
@@ -1184,7 +1188,7 @@ f_getftime(typval_T *argvars, typval_T *rettv)
char_u *fname;
stat_T st;
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
fname = tv_get_string(&argvars[0]);
if (mch_stat((char *)fname, &st) >= 0)
@@ -1230,7 +1234,7 @@ f_getftype(typval_T *argvars, typval_T *rettv)
stat_T st;
char_u *type = NULL;
if (in_vim9script() && check_for_string(&argvars[0]) == FAIL)
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
fname = tv_get_string(&argvars[0]);
@@ -2410,6 +2414,11 @@ f_browse(typval_T *argvars UNUSED, typval_T *rettv)
char_u buf2[NUMBUFLEN];
int error = FALSE;
if (in_vim9script()
&& (check_for_string_arg(argvars, 1) == FAIL
|| check_for_string_arg(argvars, 2) == FAIL
|| check_for_string_arg(argvars, 3) == FAIL))
return;
save = (int)tv_get_number_chk(&argvars[0], &error);
title = tv_get_string_chk(&argvars[1]);
initdir = tv_get_string_buf_chk(&argvars[2], buf);
+3 -1
View File
@@ -1865,6 +1865,7 @@ EXTERN int nfa_fail_for_testing INIT(= FALSE);
EXTERN int no_query_mouse_for_testing INIT(= FALSE);
EXTERN int ui_delay_for_testing INIT(= 0);
EXTERN int reset_term_props_on_termresponse INIT(= FALSE);
EXTERN long override_sysinfo_uptime INIT(= -1);
EXTERN int in_free_unref_items INIT(= FALSE);
#endif
@@ -1902,7 +1903,8 @@ EXTERN listitem_T range_list_item;
// Passed to an eval() function to enable evaluation.
EXTERN evalarg_T EVALARG_EVALUATE
# ifdef DO_INIT
= {EVAL_EVALUATE, 0, NULL, NULL, NULL, {0, 0, 0, 0, NULL}, NULL, NULL}
= {EVAL_EVALUATE, 0, NULL, NULL, NULL, {0, 0, 0, 0, NULL},
NULL, NULL, NULL}
# endif
;
#endif
+1 -1
View File
@@ -920,7 +920,7 @@ drawBalloon(BalloonEval *beval)
screen = gtk_widget_get_screen(beval->target);
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
# endif
gui_gtk_get_screen_geom_of_win(beval->target,
gui_gtk_get_screen_geom_of_win(beval->target, 0, 0,
&screen_x, &screen_y, &screen_w, &screen_h);
# if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_ensure_style(beval->balloonShell);
+87 -58
View File
@@ -4155,6 +4155,88 @@ mainwin_destroy_cb(GObject *object UNUSED, gpointer data UNUSED)
#endif
}
void
gui_gtk_get_screen_geom_of_win(
GtkWidget *wid,
int point_x, // x position of window if not initialized
int point_y, // y position of window if not initialized
int *screen_x,
int *screen_y,
int *width,
int *height)
{
GdkRectangle geometry;
GdkWindow *win = gtk_widget_get_window(wid);
#if GTK_CHECK_VERSION(3,22,0)
GdkDisplay *dpy;
GdkMonitor *monitor;
if (wid != NULL && gtk_widget_get_realized(wid))
dpy = gtk_widget_get_display(wid);
else
dpy = gdk_display_get_default();
if (win != NULL)
monitor = gdk_display_get_monitor_at_window(dpy, win);
else
monitor = gdk_display_get_monitor_at_point(dpy, point_x, point_y);
gdk_monitor_get_geometry(monitor, &geometry);
#else
GdkScreen* screen;
int monitor;
if (wid != NULL && gtk_widget_has_screen(wid))
screen = gtk_widget_get_screen(wid);
else
screen = gdk_screen_get_default();
if (win != NULL)
monitor = gdk_screen_get_monitor_at_window(screen, win);
else
monitor = gdk_screen_get_monitor_at_point(screen, point_x, point_y);
gdk_screen_get_monitor_geometry(screen, monitor, &geometry);
#endif
*screen_x = geometry.x;
*screen_y = geometry.y;
*width = geometry.width;
*height = geometry.height;
}
/*
* The screen size is used to make sure the initial window doesn't get bigger
* than the screen. This subtracts some room for menubar, toolbar and window
* decorations.
*/
static void
gui_gtk_get_screen_dimensions(
int point_x,
int point_y,
int *screen_w,
int *screen_h)
{
int x, y;
gui_gtk_get_screen_geom_of_win(gui.mainwin, point_x, point_y,
&x, &y, screen_w, screen_h);
// Subtract 'guiheadroom' from the height to allow some room for the
// window manager (task list and window title bar).
*screen_h -= p_ghr;
/*
* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
* the toolbar and menubar for GTK, we subtract them from the screen
* height, so that the window size can be made to fit on the screen.
* This should be completely changed later.
*/
*screen_w -= get_menu_tool_width();
*screen_h -= get_menu_tool_height();
}
void
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
{
gui_gtk_get_screen_dimensions(0, 0, screen_w, screen_h);
}
/*
* Bit of a hack to ensure we start GtkPlug windows with the correct window
@@ -4250,7 +4332,12 @@ gui_mch_open(void)
if (mask & (XValue | YValue))
{
int ww, hh;
#ifdef FEAT_GUI_GTK
gui_gtk_get_screen_dimensions(x, y, &ww, &hh);
#else
gui_mch_get_screen_dimensions(&ww, &hh);
#endif
hh += p_ghr + get_menu_tool_height();
ww += get_menu_tool_width();
if (mask & XNegative)
@@ -4538,64 +4625,6 @@ gui_mch_set_shellsize(int width, int height,
gui_mch_update();
}
void
gui_gtk_get_screen_geom_of_win(
GtkWidget *wid,
int *screen_x,
int *screen_y,
int *width,
int *height)
{
GdkRectangle geometry;
GdkWindow *win = gtk_widget_get_window(wid);
#if GTK_CHECK_VERSION(3,22,0)
GdkDisplay *dpy = gtk_widget_get_display(wid);
GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
gdk_monitor_get_geometry(monitor, &geometry);
#else
GdkScreen* screen;
int monitor;
if (wid != NULL && gtk_widget_has_screen(wid))
screen = gtk_widget_get_screen(wid);
else
screen = gdk_screen_get_default();
monitor = gdk_screen_get_monitor_at_window(screen, win);
gdk_screen_get_monitor_geometry(screen, monitor, &geometry);
#endif
*screen_x = geometry.x;
*screen_y = geometry.y;
*width = geometry.width;
*height = geometry.height;
}
/*
* The screen size is used to make sure the initial window doesn't get bigger
* than the screen. This subtracts some room for menubar, toolbar and window
* decorations.
*/
void
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
{
int x, y;
gui_gtk_get_screen_geom_of_win(gui.mainwin, &x, &y, screen_w, screen_h);
// Subtract 'guiheadroom' from the height to allow some room for the
// window manager (task list and window title bar).
*screen_h -= p_ghr;
/*
* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
* the toolbar and menubar for GTK, we subtract them from the screen
* height, so that the window size can be made to fit on the screen.
* This should be completely changed later.
*/
*screen_w -= get_menu_tool_width();
*screen_h -= get_menu_tool_height();
}
#if defined(FEAT_TITLE) || defined(PROTO)
void
gui_mch_settitle(char_u *title, char_u *icon UNUSED)
+7 -2
View File
@@ -1996,7 +1996,11 @@ do_mnemonic(Widget w, unsigned int keycode)
* Callback routine for dialog mnemonic processing.
*/
static void
mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
mnemonic_event(
Widget w,
XtPointer call_data UNUSED,
XKeyEvent *event,
Boolean *b UNUSED)
{
do_mnemonic(w, event->keycode);
}
@@ -3565,7 +3569,8 @@ find_replace_callback(
find_replace_keypress(
Widget w UNUSED,
SharedFindReplace *frdp,
XKeyEvent *event)
XKeyEvent *event,
Boolean *b UNUSED)
{
KeySym keysym;
+6
View File
@@ -1753,7 +1753,13 @@ gui_mch_init_font(
// A font name equal "*" is indicating, that we should activate the font
// selection dialogue to get a new font name. So let us do it here.
if (font_name != NULL && STRCMP(font_name, "*") == 0)
{
font_name = gui_xm_select_font(hl_get_font_name());
// Do not reset to default font except on GUI startup.
if (font_name == NULL && !gui.starting)
return OK;
}
#endif
#ifdef FEAT_XFONTSET
+1 -1
View File
@@ -230,7 +230,7 @@ im_preedit_window_set_position(void)
if (preedit_window == NULL)
return;
gui_gtk_get_screen_geom_of_win(gui.drawarea,
gui_gtk_get_screen_geom_of_win(gui.drawarea, 0, 0,
&screen_x, &screen_y, &screen_width, &screen_height);
gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y);
gtk_window_get_size(GTK_WINDOW(preedit_window), &width, &height);
+5
View File
@@ -568,6 +568,11 @@ luaV_pushtypval(lua_State *L, typval_T *tv)
case VAR_FUNC:
luaV_pushfuncref(L, tv->vval.v_string);
break;
case VAR_PARTIAL:
// TODO: handle partial arguments
luaV_pushfuncref(L, partial_name(tv->vval.v_partial));
break;
case VAR_BLOB:
luaV_pushblob(L, tv->vval.v_blob);
break;
+2 -2
View File
@@ -2052,7 +2052,7 @@ filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap)
{
// Check that map() does not change the type of the dict.
ga_init2(&type_list, sizeof(type_T *), 10);
type = typval2type(argvars, &type_list);
type = typval2type(argvars, get_copyID(), &type_list);
}
if (argvars[0].v_type == VAR_BLOB)
@@ -2558,7 +2558,7 @@ extend(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg, int is_new)
{
// Check that map() does not change the type of the dict.
ga_init2(&type_list, sizeof(type_T *), 10);
type = typval2type(argvars, &type_list);
type = typval2type(argvars, get_copyID(), &type_list);
}
if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)
+18 -6
View File
@@ -1059,6 +1059,19 @@ is_not_a_term()
return params.not_a_term;
}
/*
* Return TRUE when the --not-a-term argument was found or the GUI is in use.
*/
static int
is_not_a_term_or_gui()
{
return params.not_a_term
#ifdef FEAT_GUI
|| gui.in_use
#endif
;
}
// When TRUE in a safe state when starting to wait for a character.
static int was_safe = FALSE;
@@ -1604,9 +1617,7 @@ getout(int exitval)
#endif
// Position the cursor on the last screen line, below all the text
#ifdef FEAT_GUI
if (!gui.in_use)
#endif
if (!is_not_a_term_or_gui())
windgoto((int)Rows - 1, 0);
#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
@@ -1716,9 +1727,7 @@ getout(int exitval)
}
// Position the cursor again, the autocommands may have moved it
#ifdef FEAT_GUI
if (!gui.in_use)
#endif
if (!is_not_a_term_or_gui())
windgoto((int)Rows - 1, 0);
#ifdef FEAT_JOB_CHANNEL
@@ -3627,8 +3636,11 @@ usage(void)
#endif // FEAT_GUI_X11
#ifdef FEAT_GUI_GTK
mch_msg(_("\nArguments recognised by gvim (GTK+ version):\n"));
main_msg(_("-background <color>\tUse <color> for the background (also: -bg)"));
main_msg(_("-foreground <color>\tUse <color> for normal text (also: -fg)"));
main_msg(_("-font <font>\t\tUse <font> for normal text (also: -fn)"));
main_msg(_("-geometry <geom>\tUse <geom> for initial geometry (also: -geom)"));
main_msg(_("-iconic\t\tStart Vim iconified"));
main_msg(_("-reverse\t\tUse reverse video (also: -rv)"));
main_msg(_("-display <display>\tRun Vim on <display> (also: --display)"));
main_msg(_("--role <role>\tSet a unique role to identify the main window"));
+1 -1
View File
@@ -5560,7 +5560,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
void
f_charclass(typval_T *argvars, typval_T *rettv UNUSED)
{
if (check_for_string(&argvars[0]) == FAIL)
if (check_for_string_arg(argvars, 0) == FAIL)
return;
rettv->vval.v_number = mb_get_class(argvars[0].vval.v_string);
}
+32 -7
View File
@@ -1080,6 +1080,35 @@ add_b0_fenc(
}
}
#if defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO_UPTIME)
# include <sys/sysinfo.h>
#endif
/*
* Return TRUE if the process with number "b0p->b0_pid" is still running.
* "swap_fname" is the name of the swap file, if it's from before a reboot then
* the result is FALSE;
*/
static int
swapfile_process_running(ZERO_BL *b0p, char_u *swap_fname UNUSED)
{
#ifdef HAVE_SYSINFO_UPTIME
stat_T st;
struct sysinfo sinfo;
// If the system rebooted after when the swap file was written then the
// process can't be running now.
if (mch_stat((char *)swap_fname, &st) != -1
&& sysinfo(&sinfo) == 0
&& st.st_mtime < time(NULL) - (
# ifdef FEAT_EVAL
override_sysinfo_uptime >= 0 ? override_sysinfo_uptime :
# endif
sinfo.uptime))
return FALSE;
#endif
return mch_process_running(char_to_long(b0p->b0_pid));
}
/*
* Try to recover curbuf from the .swp file.
@@ -1692,7 +1721,7 @@ ml_recover(int checkext)
msg(_("Recovery completed. Buffer contents equals file contents."));
msg_puts(_("\nYou may want to delete the .swp file now."));
#if defined(UNIX) || defined(MSWIN)
if (mch_process_running(char_to_long(b0p->b0_pid)))
if (swapfile_process_running(b0p, fname_used))
{
// Warn there could be an active Vim on the same file, the user may
// want to kill it.
@@ -2170,7 +2199,7 @@ swapfile_info(char_u *fname)
msg_puts(_("\n process ID: "));
msg_outnum(char_to_long(b0.b0_pid));
#if defined(UNIX) || defined(MSWIN)
if (mch_process_running(char_to_long(b0.b0_pid)))
if (swapfile_process_running(&b0, fname))
{
msg_puts(_(" (STILL RUNNING)"));
# ifdef HAVE_PROCESS_STILL_RUNNING
@@ -2213,9 +2242,6 @@ swapfile_unchanged(char_u *fname)
int fd;
struct block0 b0;
int ret = TRUE;
#if defined(UNIX) || defined(MSWIN)
long pid;
#endif
// must be able to stat the swap file
if (mch_stat((char *)fname, &st) == -1)
@@ -2258,8 +2284,7 @@ swapfile_unchanged(char_u *fname)
}
// process must be known and not be running
pid = char_to_long(b0.b0_pid);
if (pid == 0L || mch_process_running(pid))
if (char_to_long(b0.b0_pid) == 0L || swapfile_process_running(&b0, fname))
ret = FALSE;
#endif
+3 -2
View File
@@ -2026,8 +2026,9 @@ ga_clear_strings(garray_T *gap)
{
int i;
for (i = 0; i < gap->ga_len; ++i)
vim_free(((char_u **)(gap->ga_data))[i]);
if (gap->ga_data != NULL)
for (i = 0; i < gap->ga_len; ++i)
vim_free(((char_u **)(gap->ga_data))[i]);
ga_clear(gap);
}
+7 -4
View File
@@ -3247,7 +3247,9 @@ set_bool_option(
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
curwin->w_set_curswant = TRUE;
check_redraw(options[opt_idx].flags);
if ((opt_flags & OPT_NO_REDRAW) == 0)
check_redraw(options[opt_idx].flags);
return NULL;
}
@@ -3263,8 +3265,8 @@ set_num_option(
long value, // new value
char *errbuf, // buffer for error messages
size_t errbuflen, // length of "errbuf"
int opt_flags) // OPT_LOCAL, OPT_GLOBAL and
// OPT_MODELINE
int opt_flags) // OPT_LOCAL, OPT_GLOBAL,
// OPT_MODELINE, etc.
{
char *errmsg = NULL;
long old_value = *(long *)varp;
@@ -3842,7 +3844,8 @@ set_num_option(
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
curwin->w_set_curswant = TRUE;
check_redraw(options[opt_idx].flags);
if ((opt_flags & OPT_NO_REDRAW) == 0)
check_redraw(options[opt_idx].flags);
return errmsg;
}
+3
View File
@@ -383,6 +383,9 @@ EXTERN char_u *p_ambw; // 'ambiwidth'
#ifdef FEAT_AUTOCHDIR
EXTERN int p_acd; // 'autochdir'
#endif
#ifdef FEAT_AUTOSHELLDIR
EXTERN int p_asd; // 'autoshelldir'
#endif
EXTERN int p_ai; // 'autoindent'
EXTERN int p_bin; // 'binary'
EXTERN int p_bomb; // 'bomb'
+9
View File
@@ -411,6 +411,15 @@ static struct vimoption options[] =
#else
(char_u *)NULL, PV_NONE,
{(char_u *)0L, (char_u *)0L}
#endif
SCTX_INIT},
{"autoshelldir", "asd", P_BOOL|P_VI_DEF,
#ifdef FEAT_AUTOSHELLDIR
(char_u *)&p_asd, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}
#else
(char_u *)NULL, PV_NONE,
{(char_u *)0L, (char_u *)0L}
#endif
SCTX_INIT},
{"autoindent", "ai", P_BOOL|P_VI_DEF,
+6 -3
View File
@@ -2480,11 +2480,14 @@ ambw_end:
&& (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0)
curwin->w_set_curswant = TRUE;
if ((opt_flags & OPT_NO_REDRAW) == 0)
{
#ifdef FEAT_GUI
// check redraw when it's not a GUI option or the GUI is active.
if (!redraw_gui_only || gui.in_use)
// check redraw when it's not a GUI option or the GUI is active.
if (!redraw_gui_only || gui.in_use)
#endif
check_redraw(get_option_flags(opt_idx));
check_redraw(get_option_flags(opt_idx));
}
#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
if (did_swaptcap)
+7 -4
View File
@@ -3349,7 +3349,7 @@ exit_scroll(void)
else
out_char('\n');
}
else
else if (!is_not_a_term())
{
restore_cterm_colors(); // get original colors back
msg_clr_eos_force(); // clear the rest of the display
@@ -3376,9 +3376,12 @@ mch_exit(int r)
{
settmode(TMODE_COOK);
#ifdef FEAT_TITLE
// restore xterm title and icon name
mch_restore_title(SAVE_RESTORE_BOTH);
term_pop_title(SAVE_RESTORE_BOTH);
if (!is_not_a_term())
{
// restore xterm title and icon name
mch_restore_title(SAVE_RESTORE_BOTH);
term_pop_title(SAVE_RESTORE_BOTH);
}
#endif
/*
* When t_ti is not empty but it doesn't cause swapping terminal
+2 -2
View File
@@ -56,12 +56,12 @@ void set_reg_var(int c);
char_u *v_exception(char_u *oldval);
char_u *v_throwpoint(char_u *oldval);
char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
int eval_variable(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload);
int eval_variable(char_u *name, int len, typval_T *rettv, dictitem_T **dip, int flags);
void check_vars(char_u *name, int len);
dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload);
dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload);
hashtab_T *get_script_local_ht(void);
int lookup_scriptitem(char_u *name, size_t len, cctx_T *dummy);
int lookup_scriptitem(char_u *name, size_t len, int cmd, cctx_T *dummy);
hashtab_T *find_var_ht(char_u *name, char_u **varname);
char_u *get_var_value(char_u *name);
void new_script_vars(scid_T id);
+3 -1
View File
@@ -8,12 +8,14 @@ void *getline_cookie(char_u *(*fgetline)(int, void *, int, getline_opt_T), void
char_u *getline_peek(char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie);
char *ex_errmsg(char *msg, char_u *arg);
int parse_command_modifiers(exarg_T *eap, char **errormsg, cmdmod_T *cmod, int skip_only);
int has_cmdmod(cmdmod_T *cmod);
int cmdmod_error(void);
void apply_cmdmod(cmdmod_T *cmod);
void undo_cmdmod(cmdmod_T *cmod);
int parse_cmd_address(exarg_T *eap, char **errormsg, int silent);
int checkforcmd(char_u **pp, char *cmd, int len);
char_u *skip_option_env_lead(char_u *start);
char_u *find_ex_command(exarg_T *eap, int *full, int (*lookup)(char_u *, size_t, cctx_T *), cctx_T *cctx);
char_u *find_ex_command(exarg_T *eap, int *full, int (*lookup)(char_u *, size_t, int cmd, cctx_T *), cctx_T *cctx);
int modifier_len(char_u *cmd);
int cmd_exists(char_u *name);
void f_fullcommand(typval_T *argvars, typval_T *rettv);
+2 -2
View File
@@ -18,6 +18,8 @@ void gui_gtk_set_dnd_targets(void);
int gui_mch_init(void);
void gui_mch_forked(void);
void gui_mch_new_colors(void);
void gui_gtk_get_screen_geom_of_win(GtkWidget *wid, int point_x, int point_y, int *screen_x, int *screen_y, int *width, int *height);
void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
int gui_mch_open(void);
void gui_mch_exit(int rc);
int gui_mch_get_winpos(int *x, int *y);
@@ -26,8 +28,6 @@ int gui_mch_maximized(void);
void gui_mch_unmaximize(void);
void gui_mch_newfont(void);
void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
void gui_gtk_get_screen_geom_of_win(GtkWidget *wid, int *screen_x, int *screen_y, int *width, int *height);
void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h);
void gui_mch_settitle(char_u *title, char_u *icon);
void gui_mch_enable_menu(int showit);
void gui_mch_show_toolbar(int showit);
+2 -2
View File
@@ -9,8 +9,8 @@ varnumber_T tv_get_number_chk(typval_T *varp, int *denote);
varnumber_T tv_get_bool(typval_T *varp);
varnumber_T tv_get_bool_chk(typval_T *varp, int *denote);
float_T tv_get_float(typval_T *varp);
int check_for_string(typval_T *tv);
int check_for_nonempty_string(typval_T *tv);
int check_for_string_arg(typval_T *args, int idx);
int check_for_nonempty_string_arg(typval_T *args, int idx);
char_u *tv_get_string(typval_T *varp);
char_u *tv_get_string_strict(typval_T *varp);
char_u *tv_get_string_buf(typval_T *varp, char_u *buf);
+2 -2
View File
@@ -1,11 +1,11 @@
/* ui.c */
void ui_write(char_u *s, int len);
void ui_write(char_u *s, int len, int console);
void ui_inchar_undo(char_u *s, int len);
int ui_inchar(char_u *buf, int maxlen, long wtime, int tb_change_cnt);
int inchar_loop(char_u *buf, int maxlen, long wtime, int tb_change_cnt, int (*wait_func)(long wtime, int *interrupted, int ignore_input), int (*resize_func)(int check_only));
int ui_wait_for_chars_or_timer(long wtime, int (*wait_func)(long wtime, int *interrupted, int ignore_input), int *interrupted, int ignore_input);
int ui_char_avail(void);
void ui_delay(long msec, int ignoreinput);
void ui_delay(long msec_arg, int ignoreinput);
void ui_suspend(void);
void suspend_shell(void);
int ui_get_shellsize(void);
+1
View File
@@ -14,6 +14,7 @@ char_u *to_name_end(char_u *arg, int use_namespace);
char_u *to_name_const_end(char_u *arg);
exprtype_T get_compare_type(char_u *p, int *len, int *type_is);
void error_white_both(char_u *op, int len);
void fill_exarg_from_cctx(exarg_T *eap, cctx_T *cctx);
int assignment_len(char_u *p, int *heredoc);
void vim9_declare_error(char_u *name);
int check_vim9_unlet(char_u *name);
+3 -1
View File
@@ -1,13 +1,15 @@
/* vim9script.c */
int in_vim9script(void);
int current_script_is_vim9(void);
void ex_vim9script(exarg_T *eap);
int not_in_vim9(exarg_T *eap);
int vim9_bad_comment(char_u *p);
int vim9_comment_start(char_u *p);
void ex_export(exarg_T *eap);
void free_imports_and_script_vars(int sid);
void mark_imports_for_reload(int sid);
void ex_import(exarg_T *eap);
int find_exported(int sid, char_u *name, ufunc_T **ufunc, type_T **type, cctx_T *cctx);
int find_exported(int sid, char_u *name, ufunc_T **ufunc, type_T **type, cctx_T *cctx, int verbose);
char_u *handle_import(char_u *arg_start, garray_T *gap, int import_sid, evalarg_T *evalarg, void *cctx);
char_u *vim9_declare_scriptvar(exarg_T *eap, char_u *arg);
void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type);
+1 -1
View File
@@ -9,7 +9,7 @@ type_T *alloc_func_type(type_T *ret_type, int argcount, garray_T *type_gap);
type_T *get_func_type(type_T *ret_type, int argcount, garray_T *type_gap);
int func_type_add_arg_types(type_T *functype, int argcount, garray_T *type_gap);
int need_convert_to_bool(type_T *type, typval_T *tv);
type_T *typval2type(typval_T *tv, garray_T *type_gap);
type_T *typval2type(typval_T *tv, int copyID, garray_T *type_gap);
type_T *typval2type_vimvar(typval_T *tv, garray_T *type_gap);
int check_typval_arg_type(type_T *expected, typval_T *actual_tv, int arg_idx);
int check_typval_type(type_T *expected, typval_T *actual_tv, where_T where);
+6 -1
View File
@@ -295,8 +295,13 @@ fill_foldcolumn(
if (closed)
{
if (symbol != 0)
// rollback length
{
// rollback length and the character
byte_counter -= len;
if (len > 1)
// for a multibyte character, erase all the bytes
vim_memset(p + byte_counter, ' ', len);
}
symbol = fill_foldclosed;
len = utf_char2bytes(symbol, &p[byte_counter]);
byte_counter += len;
+28 -1
View File
@@ -1459,7 +1459,34 @@ almosttheend:
si = SCRIPT_ITEM(current_sctx.sc_sid);
if (si->sn_save_cpo != NULL)
{
set_option_value((char_u *)"cpo", 0L, si->sn_save_cpo, 0);
if (STRCMP(p_cpo, CPO_VIM) != 0)
{
char_u *f;
char_u *t;
// 'cpo' was changed in the script. Apply the same change to the
// saved value, if possible.
for (f = (char_u *)CPO_VIM; *f != NUL; ++f)
if (vim_strchr(p_cpo, *f) == NULL
&& (t = vim_strchr(si->sn_save_cpo, *f)) != NULL)
// flag was removed, also remove it from the saved 'cpo'
mch_memmove(t, t + 1, STRLEN(t));
for (f = p_cpo; *f != NUL; ++f)
if (vim_strchr((char_u *)CPO_VIM, *f) == NULL
&& vim_strchr(si->sn_save_cpo, *f) == NULL)
{
// flag was added, also add it to the saved 'cpo'
t = alloc(STRLEN(si->sn_save_cpo) + 2);
if (t != NULL)
{
*t = *f;
STRCPY(t + 1, si->sn_save_cpo);
vim_free(si->sn_save_cpo);
si->sn_save_cpo = t;
}
}
}
set_option_value((char_u *)"cpo", 0L, si->sn_save_cpo, OPT_NO_REDRAW);
VIM_CLEAR(si->sn_save_cpo);
}
+2 -1
View File
@@ -401,11 +401,12 @@ put_view(
{
buf_T *alt = buflist_findnr(wp->w_alt_fnum);
// Set the alternate file.
// Set the alternate file if the buffer is listed.
if ((flagp == &ssop_flags)
&& alt != NULL
&& alt->b_fname != NULL
&& *alt->b_fname != NUL
&& alt->b_p_bl
&& (fputs("balt ", fd) < 0
|| ses_fname(fd, alt, flagp, TRUE) == FAIL))
return FAIL;
+3 -2
View File
@@ -1607,8 +1607,6 @@ typedef struct
type_T **uf_arg_types; // argument types (count == uf_args.ga_len)
type_T *uf_ret_type; // return type
garray_T uf_type_list; // types used in arg and return types
int *uf_def_arg_idx; // instruction indexes for evaluating
// uf_def_args; length: uf_def_args.ga_len + 1
partial_T *uf_partial; // for closure created inside :def function:
// information about the context
@@ -1882,6 +1880,9 @@ typedef struct {
// pointer to the last line obtained with getsourceline()
char_u *eval_tofree;
// pointer to the last line of an inline function
char_u *eval_tofree_cmdline;
// pointer to the lines concatenated for a lambda.
char_u *eval_tofree_lambda;
} evalarg_T;
+4 -3
View File
@@ -1308,7 +1308,7 @@ find_tagfunc_tags(
int result = FAIL;
typval_T args[4];
typval_T rettv;
char_u flagString[3];
char_u flagString[4];
dict_T *d;
taggy_T *tag = &curwin->w_tagstack[curwin->w_tagstackidx];
@@ -1335,9 +1335,10 @@ find_tagfunc_tags(
args[3].v_type = VAR_UNKNOWN;
vim_snprintf((char *)flagString, sizeof(flagString),
"%s%s",
"%s%s%s",
g_tag_at_cursor ? "c": "",
flags & TAG_INS_COMP ? "i": "");
flags & TAG_INS_COMP ? "i": "",
flags & TAG_REGEXP ? "r": "");
save_pos = curwin->w_cursor;
result = call_vim_function(curbuf->b_p_tfu, 3, args, &rettv);
+4 -3
View File
@@ -2551,7 +2551,7 @@ out_flush(void)
// set out_pos to 0 before ui_write, to avoid recursiveness
len = out_pos;
out_pos = 0;
ui_write(out_buf, len);
ui_write(out_buf, len, FALSE);
#ifdef FEAT_JOB_CHANNEL
if (ch_log_output)
{
@@ -3371,8 +3371,9 @@ win_new_shellsize(void)
ui_new_shellsize();
if (old_Rows != Rows)
{
// if 'window' uses the whole screen, keep it using that
if (p_window == old_Rows - 1 || old_Rows == 0)
// If 'window' uses the whole screen, keep it using that.
// Don't change it when set with "-w size" on the command line.
if (p_window == old_Rows - 1 || (old_Rows == 0 && p_window == 0))
p_window = Rows - 1;
old_Rows = Rows;
shell_new_rows(); // update window sizes
+74 -1
View File
@@ -4297,6 +4297,73 @@ handle_call_command(term_T *term, channel_T *channel, listitem_T *item)
ch_log(channel, "Calling function %s failed", func);
}
/*
* URL decoding (also know as Percent-encoding).
*
* Note this function currently is only used for decoding shell's
* OSC 7 escape sequence which we can assume all bytes are valid
* UTF-8 bytes. Thus we don't need to deal with invalid UTF-8
* encoding bytes like 0xfe, 0xff.
*/
static size_t
url_decode(const char *src, const size_t len, char_u *dst)
{
size_t i = 0, j = 0;
while (i < len)
{
if (src[i] == '%' && i + 2 < len)
{
dst[j] = hexhex2nr((char_u *)&src[i + 1]);
j++;
i += 3;
}
else
{
dst[j] = src[i];
i++;
j++;
}
}
dst[j] = '\0';
return j;
}
/*
* Sync terminal buffer's cwd with shell's pwd with the help of OSC 7.
*
* The OSC 7 sequence has the format of
* "\033]7;file://HOSTNAME/CURRENT/DIR\033\\"
* and what VTerm provides via VTermStringFragment is
* "file://HOSTNAME/CURRENT/DIR"
*/
static void
sync_shell_dir(VTermStringFragment *frag)
{
int offset = 7; // len of "file://" is 7
char *pos = (char *)frag->str + offset;
char_u *new_dir;
// remove HOSTNAME to get PWD
while (*pos != '/' && offset < frag->len)
{
offset += 1;
pos += 1;
}
if (offset >= frag->len)
{
semsg(_(e_failed_to_extract_pwd_from_str_check_your_shell_config),
frag->str);
return;
}
new_dir = alloc(frag->len - offset + 1);
url_decode(pos, frag->len-offset, new_dir);
changedir_func(new_dir, TRUE, CDSCOPE_WINDOW);
vim_free(new_dir);
}
/*
* Called by libvterm when it cannot recognize an OSC sequence.
* We recognize a terminal API command.
@@ -4311,7 +4378,13 @@ parse_osc(int command, VTermStringFragment frag, void *user)
: term->tl_job->jv_channel;
garray_T *gap = &term->tl_osc_buf;
// We recognize only OSC 5 1 ; {command}
// We recognize only OSC 5 1 ; {command} and OSC 7 ; {command}
if (p_asd && command == 7)
{
sync_shell_dir(&frag);
return 1;
}
if (command != 51)
return 0;
+1
View File
@@ -461,6 +461,7 @@ NEW_TESTS_RES = \
test_quickfix.res \
test_quotestar.res \
test_random.res \
test_recover.res \
test_regex_char_classes.res \
test_registers.res \
test_rename.res \
+1 -1
View File
@@ -12,7 +12,7 @@ SCRIPTSOURCE = ../../runtime
# Comment out this line to see the verbose output of tests.
#
# Catches SwapExists to avoid hanging at the ATTENTION prompt.
REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' > /dev/null
REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($$0, "Executing Test_[^\\)]*\\)"); print substr($$0, RSTART, RLENGTH) "\r"; fflush()}'
# Uncomment this line to use valgrind for memory leaks and extra warnings.
# The output goes into a file "valgrind.testN"
+33 -1
View File
@@ -84,8 +84,15 @@ func CheckUnix()
endif
endfunc
" Command to check for running on Linix
command CheckLinux call CheckLinux()
func CheckLinux()
if !has('linux')
throw 'Skipped: only works on Linux'
endif
endfunc
" Command to check for not running on a BSD system.
" TODO: using this checks should not be needed
command CheckNotBSD call CheckNotBSD()
func CheckNotBSD()
if has('bsd')
@@ -191,4 +198,29 @@ func CheckNotAsan()
endif
endfunc
" Command to check for satisfying any of the conditions.
" e.g. CheckAnyOf Feature:bsd Feature:sun Linux
command -nargs=+ CheckAnyOf call CheckAnyOf(<f-args>)
func CheckAnyOf(...)
let excp = []
for arg in a:000
try
exe 'Check' .. substitute(arg, ':', ' ', '')
return
catch /^Skipped:/
let excp += [substitute(v:exception, '^Skipped:\s*', '', '')]
endtry
endfor
throw 'Skipped: ' .. join(excp, '; ')
endfunc
" Command to check for satisfying all of the conditions.
" e.g. CheckAllOf Unix Gui Option:ballooneval
command -nargs=+ CheckAllOf call CheckAllOf(<f-args>)
func CheckAllOf(...)
for arg in a:000
exe 'Check' .. substitute(arg, ':', ' ', '')
endfor
endfunc
" vim: shiftwidth=2 sts=2 expandtab

Some files were not shown because too many files have changed in this diff Show More