Commit Graph

22019 Commits

Author SHA1 Message Date
zeertzjq
5551a29d06 vim-patch:8.0.1588: popup menu hangs after typing CTRL-C
Problem:    Popup menu hangs after typing CTRL-C.
Solution:   Make CTRL-C exit the loop. (Ozaki Kiichi, closes vim/vim#2697)
52f18a112a
2022-07-01 10:17:39 +08:00
zeertzjq
e4c2ff2da4 vim-patch:8.0.1574: show cursor in wrong place when using popup menu
Problem:    Show cursor in wrong place when using popup menu. (Wei Zhang)
Solution:   Force updating the cursor position.  Fix skipping over unused
            entries.
987723e084
2022-07-01 10:17:39 +08:00
zeertzjq
610cf9f950 vim-patch:8.0.1570: can't use :popup for a menu in the terminal
Problem:    Can't use :popup for a menu in the terminal. (Wei Zhang)
Solution:   Make :popup work in the terminal.  Also fix that entries were
            included that don't work in the current state.
29a2c08d79
2022-07-01 10:17:39 +08:00
zeertzjq
cf8df141f3 vim-patch:8.0.1558: no right-click menu in a terminal
Problem:    No right-click menu in a terminal.
Solution:   Implement the right click menu for the terminal.
aef8c3da2b
2022-07-01 10:13:06 +08:00
Shougo
5a490d838e
cmdheight=0: fix bugs #18961
Continue of #16251

Fix #18953
Fix #18960
Fix #18958
Fix #18955
Fix #18970
Fix #18983
Fix #18995
Fix #19112
2022-06-30 18:59:50 -07:00
Gregory Anders
3b1423bfa7
fix(filetype): update call sites of vim.filetype.match (#19171)
These were not updated in #18895.
2022-06-30 09:54:44 -06:00
Javier Lopez
565f72b968
feat(marks): restore viewport on jump #15831
** Refactor

Previously most functions used to "get" a mark returned a position,
changed the line number and sometimes changed even the current buffer.

Now functions return a {x}fmark_T making calling context aware whether
the mark is in another buffer without arcane casting. A new function is
provided for switching to the mark buffer and returning a flag style
Enum to convey what happen in the movement. If the cursor changed, line,
columns, if it changed buffer, etc.

The function to get named mark was split into multiple functions.

- mark_get() -> fmark_T
- mark_get_global() -> xfmark_T
- mark_get_local() -> fmark_T
  - mark_get_motion() -> fmark_T
  - mark_get_visual() -> fmark_T

Functions that manage the changelist and jumplist were also modified to
return mark types.

- get_jumplist -> fmark_T
- get_changelist -> fmark_T

The refactor is also seen mainly on normal.c, where all the mark
movement has been siphoned through one function nv_gomark, while the
other functions handle getting the mark and setting their movement
flags. To handle whether context marks should be left, etc.

** Mark View

While doing the refactor the concept of a mark view was also
implemented:

The view of a mark currently implemented as the number of lines between
the mark position on creation and the window topline. This allows for
moving not only back to the position of a mark but having the window
look similar to when the mark was defined. This is done by carrying and
extra element in the fmark_T struct, which can be extended later to also
restore horizontal shift.

*** User space features

1. There's a new option, jumpoptions+=view enables the mark view restoring
automatically when using the jumplist, changelist, alternate-file and
mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark]

** Limitations

- The view information is not saved in shada.
- Calls to get_mark should copy the value in the pointer since we are
  using pos_to_mark() to wrap and provide a homogeneous interfaces. This
  was also a limitation in the previous state of things.
2022-06-30 05:59:52 -07:00
dundargoc
cb84f5ee53
refactor(uncrustify): change config to better align with style guide (#18803)
refactor(uncrustify): change config to better align with neovim style
2022-06-30 20:27:52 +08:00
zeertzjq
69cd0ba27b
vim-patch:9.0.0011: reading beyond the end of the line with put command (#19166)
Problem:    Reading beyond the end of the line with put command.
Solution:   Adjust the end mark position.
d25f003342
2022-06-30 20:16:00 +08:00
dundargoc
37af46bb4c
feat(build): add_glob_target runs only on changed files #19070
The general idea is that add_glob_targets creates a "touch file", a
dummy file that acts as a dependency in order to check which files are
outdated since the last time the target was run.

Remove RunUncrustify.cmake as it's no longer necessary. It was initially
introduced to silence its noisy output. The per-file targets will
suppress the noisy output from uncrustify, except for the very first
run.

Also remove DefCmdTarget.cmake since add_glob_target already
incorporates its functionality.
2022-06-30 05:10:05 -07:00
Justin M. Keyes
f50135a32e
feat: stdpath('run'), /tmp/nvim.user/ #18993
Problem:
- Since c57f6b28d7 #8519, sockets are created in ~/.local/… but XDG
  spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which
  implies that XDG_STATE_DIR is potentially non-local.
- Not easy to inspect Nvim-created temp files (for debugging etc).

Solution:
- Store sockets in stdpath('run') ($XDG_RUNTIME_DIR).
- Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims.
- Make ok() actually useful.
- Introduce assert_nolog().

closes #3517
closes #17093
2022-06-30 04:16:46 -07:00
Hugo
514e76e4b2
vim-patch:9.0.0001: Travis CI is no longer used #19163
Problem:    Travis CI is no longer used.
Solution:   Delete the Travis CI configuration. (Hugo Osvaldo Barrera,
            closes vim/vim#10636)
75417d960b
2022-06-30 03:12:08 -07:00
bfredl
ba5be650a7
Merge pull request #19134 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for fileio.c
2022-06-30 11:51:07 +02:00
zeertzjq
995e487915
refactor(highlight)!: rename attributes to match Vim (#19159)
Ref: 84f5463630
Rename:
- `underlineline` to `underdouble`
- `underdot` to `underdotted`
- `underdash` to `underdashed`

`underdouble` also now takes higher precedence than `undercurl`.
2022-06-30 16:57:44 +08:00
Dundar Goc
593f2f753f refactor: enable -Wconversion warning for fileio.c
Work on https://github.com/neovim/neovim/issues/567
2022-06-29 22:00:56 +02:00
L3MON4D3
6f6286e4f9
fix(lsp): small bugs in snippet-parser #18998
This fixes the following bugs:
`${1:else_text}` -> format with if_text: "else_text"
`${1:-else_text}` -> format with if_text: "else_text"
`${1:}` in `format` (eg. empty else_text) -> error.
`${1:}` (eg. empty placeholder) -> error.

Thanks hrsh7th :)
2022-06-29 09:53:49 -07:00
Christian Clason
1eb9624666
vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)
Problem:    Not all Visual Basic files are recognized.
Solution:   Change detection of *.cls files. (Doug Kearns)
8b5901e2f9
2022-06-29 18:43:56 +02:00
Christian Clason
ba583f8206
vim-patch:9.0.0005: hare files are not recognized (#19151)
Problem:    Hare files are not recognized.
Solution:   Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630)
040674129f
2022-06-29 16:21:04 +02:00
zeertzjq
8ea09fc908
vim-patch:8.2.4378: incsearch HL broken when calling searchcount in 'tabLine' (#19147)
Problem:    Incsearch highlight broken when calling searchcount() in 'tabLine'
            function. (Mirko Palmer)
Solution:   Save and restore the incsearch state. (Christian Brabandt,
            closes vim/vim#9763, closes vim/vim#9633)
6dd7424c7e
2022-06-29 19:34:37 +08:00
zeertzjq
bab32bba7a
vim-patch:9.0.0002: map functionality outside of map.c (#19150)
Problem:    Map functionality outside of map.c.
Solution:   Move f_hasmapto() to map.c.  Rename a function. (closes vim/vim#10611)
c207fd2535
2022-06-29 19:25:38 +08:00
bfredl
21a1f1f552
Merge pull request #19133 from famiu/feat/api/cmd_support_filter
feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
2022-06-29 09:12:01 +02:00
Justin M. Keyes
01fc5097d3
Merge #19139 build(cmake): fix static libintl on macOS 2022-06-29 03:41:40 +02:00
Justin M. Keyes
998dc07288
feat: update unicode tables #19135 2022-06-28 18:34:56 -07:00
bfredl
3cc8559963
Merge pull request #19141 from bfredl/mapchar
refactor: define builtin mappings and autocmds without pseudo-excmds
2022-06-29 00:46:25 +02:00
bfredl
7ab2e12ebc refactor(aucmd): call define_autocmd() directly for default autocmds 2022-06-28 23:41:46 +02:00
bfredl
83170a4986 refactor(map): simplify add_map params 2022-06-28 23:40:27 +02:00
Carlo Cabrera
674787feae
ci(release): link gettext include directory
Our previous mangling of gettext broke the `HAVE_WORKING_LIBINTL` test
because it prevented CMake from finding `libintl.h`. Let's fix that by
linking Gettext's `include` directory into `/usr/local` too.
2022-06-29 02:19:45 +08:00
Carlo Cabrera
be40ba68a8
build(cmake): fix static libintl test on macOS
If `libintl` is a static library on macOS, we also need to explicitly
link with `libiconv` and the `CoreFoundation` framework. Otherwise, our
`HAVE_WORKING_LIBINTL` test erroneously fails.

Closes #19127
Closes #19138
2022-06-29 02:19:42 +08:00
Justin M. Keyes
e0f605bfd8
Merge #19120 build: rename build-related dirs 2022-06-28 13:35:56 +02:00
Famiu Haque
606ec8b708 feat(api): make nvim_parse_cmd and nvim_cmd support :filter
Also fixes a memory leak in `parse_cmdline`.

Closes #18954.
2022-06-28 17:31:04 +06:00
Thomas Vigouroux
9e14744099
fix(coverity): redundant assert #19059
* fix(coverity/353303): redundant assert
  eap->line2 is an int32_t, it is always lower than INT_MAX.
* fix(coverity/353302): redundant assert
2022-06-28 04:24:21 -07:00
Justin M. Keyes
4c0c6f8428 build: move unicode/ to src/unicode/ 2022-06-28 04:05:11 -07:00
Justin M. Keyes
f05a2891d3 build: rename build-related dirs
Problem:
Dirs "config", "packaging", and "third-party" are all closely related
but this is not obvious from the layout. This adds friction for new
contributors.

Solution:
- rename config/ to cmake.config/
- rename test/config/ to test/cmakeconfig/ because it is used in Lua
  tests: require('test.cmakeconfig.paths').
- rename packaging/ to cmake.packaging/
- rename third-party/ to cmake.deps/ (parallel with .deps/)
2022-06-28 04:02:29 -07:00
Vedant
9ddb481d88
refactor(ci): cleanup release.yml #19132 2022-06-28 03:40:53 -07:00
Justin M. Keyes
094086a713
Merge #19060 memory leaks 2022-06-28 12:37:39 +02:00
0x74696d6d79
ee6b21e843
fix(vim.ui.input): accept nil or empty "opts" #19109
Fix #18143
2022-06-28 02:53:15 -07:00
dundargoc
014a88799a
refactor: replace char_u #18429
Work on https://github.com/neovim/neovim/issues/459
2022-06-28 02:31:54 -07:00
Famiu Haque
7e1cf6b764
fix(inccommand): parse the command to check if it is previewable
Free regprog if command isn't previewable

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-06-28 13:00:05 +08:00
Christian Clason
274609a109
vim-patch:069a7d561bbe (#19130)
Update runtime files
069a7d561b
2022-06-27 23:35:26 +02:00
Christian Clason
f2fa11708c
fix(filetype): check for non-nil match in detect.rules (#19129) 2022-06-27 20:43:37 +02:00
bfredl
0c363d1a70
Merge pull request #19122 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for message.c
2022-06-27 17:07:21 +02:00
Dundar Goc
2dd01e3e21 refactor: enable -Wconversion warning for message.c
Work on https://github.com/neovim/neovim/issues/567
2022-06-27 13:55:40 +02:00
Christian Clason
f3c8f3e5d4
vim-patch:partial:8a3b805c6c9c (#19104)
Update runtime files
8a3b805c6c

skip builtin.txt (needs 8.2.4838)
skip message.txt (whitespace changes)
2022-06-27 10:23:09 +02:00
bfredl
f10489d9c2
Merge pull request #19077 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for ex_cmds.c
2022-06-27 10:09:33 +02:00
Gregory Anders
6f3508f8ed
refactor(filetype): allow vim.filetype.match to accept buf and filename (#19114)
This is necessary in cases where filetype detection acts recursively.
For example, when matching files that end with .bak, the "root" of
the filename is matched again against the same buffer (e.g. a buffer
named "foo.c.bak" will be matched again with the filename "foo.c", using
the same underlying buffer).
2022-06-27 10:03:43 +02:00
Justin M. Keyes
eab8b998e9
build: move man/ to src/man/ #19119
Problem:
man/ contains source files for manpage generation, it doesn't need to
live at the project root.

Solution:
Move it to src/man/.
2022-06-27 01:02:02 -07:00
Gregory Anders
8c2b870544
fix(api): change default value of 'pattern' in nvim_exec_autocmds (#19115)
Omitting 'pattern' in nvim_exec_autocmds should be equivalent to
omitting the 'fname' argument in :doautoall, which is equivalent to
using an empty string as the pattern. Fixes regression introduced
in #19091.
2022-06-27 09:51:33 +02:00
zeertzjq
cf23695dd7
fix(api): nvim_parse_cmd check for ambiguous user command (#19116) 2022-06-27 14:10:13 +08:00
Justin M. Keyes
e2f9d0332b
test: use "python3" to avoid skipped test #19106
Problem:
The "calls executable in $PATH" is skipped on some CI jobs because
"python" is not found.

Solution:
Use "python3" instead.
2022-06-26 22:03:06 -07:00
Thomas Vigouroux
89f75dcd1f
fix(coverity/348300): free memory when overiding sing attribute
Nothing prevent the user from doing `:sign define abc culhl=Normal
culhl=Normal` and thus this leads to an obvious memory leak.
2022-06-27 06:55:41 +02:00