Commit Graph

27254 Commits

Author SHA1 Message Date
bfredl
9b3045103f
Merge pull request #25455 from bfredl/highlight_namespace_getters
feat(ui): allow to get the highlight namespace. closes #24390
2023-10-01 10:39:31 +02:00
zeertzjq
2da66f1f71
vim-patch:9.0.1967: xattr errors not translated (#25454)
Problem:  xattr errors not translated
Solution: mark for translation, consistently capitalize
          first letter.

closes: vim/vim#13236

7ece036d72
2023-10-01 16:29:55 +08:00
Daniel Steinberg
2615ed879e feat(ui): allow to get the highlight namespace 2023-10-01 10:02:36 +02:00
zeertzjq
248305cf37
vim-patch:9.0.1964: xattr support fails to build on MacOS X (#25448)
Problem:  xattr support fails to build on MacOS X
Solution: Disable xattr support for MacOS X

MacOS X uses the same headers and functions sys/xattr.h but the function
signatures for xattr support are much different, so building fails.

So let's for now disable xattr support there.

closes: vim/vim#13230
closes: vim/vim#13232

a4dfbfed89

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-10-01 06:08:47 +08:00
zeertzjq
386bc23e43
Merge pull request #25442 from zeertzjq/vim-9.0.1962
vim-patch:9.0.{1962,1963}: extended attributes
2023-09-30 22:38:09 +08:00
zeertzjq
5c60fbe9db vim-patch:9.0.1963: Configure script may not detect xattr
Problem:  Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
          make Test_write_with_xattr_support() test
          xattr feature correctly

This also applies to the Smack security feature, so change the include
and configure script for it as well.

closes: vim/vim#13229

6de4e58cf2
2023-09-30 22:09:55 +08:00
zeertzjq
f6e72c3dfe vim-patch:9.0.1962: No support for writing extended attributes
Problem:  No support for writing extended attributes
Solution: Add extended attribute support for linux

It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.

So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris).  On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.

Enable the extended attribute support with normal builds.

I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.

In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.

Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.

closes: vim/vim#306
closes: vim/vim#13203

e085dfda5d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-30 22:09:55 +08:00
zeertzjq
a4132e1d62
test(unit): move statusline tests to statusline_spec.lua (#25441) 2023-09-30 20:38:04 +08:00
bfredl
578d634176
Merge pull request #25386 from glepnir/toggle_float
feat(float): support toggle show float window
2023-09-30 13:40:35 +02:00
zeertzjq
960170e446
vim-patch:9.0.1366: functions for setting options are in random order (#25440)
Problem:    Functions for setting options are in random order.
Solution:   Sort functions alphabetically. (Yegappan Lakshmanan,
            closes vim/vim#12082)

ad60898aa4

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-30 19:36:33 +08:00
glepnir
4200a0f167 feat(float): support toggle show float window 2023-09-30 18:30:23 +08:00
zeertzjq
2af9fac0a6
refactor: align set_chars_option() with Vim (#25438)
Needed for completion of 'listchars'/'fillchars' values.
2023-09-30 17:38:05 +08:00
zeertzjq
dc6d0d2daf
refactor: reorganize option header files (#25437)
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
2023-09-30 14:41:34 +08:00
zeertzjq
cf8b2c0e74
build(iwyu): add a few more _defs.h mappings (#25435) 2023-09-30 12:05:28 +08:00
zeertzjq
5f2d0b9329
test(old): don't check for $CLANG_SANITIZER (#25432)
Functional tests don't check for an environment variable before printing
ASAN logs, so oldtests shouldn't either.
2023-09-30 08:35:29 +08:00
zeertzjq
dbfdb52ea8
vim-patch:9.0.1956: Custom completion skips orig cmdline if it invokes glob() (#25427)
Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: vim/vim#13216

28a23602e8
2023-09-30 06:30:10 +08:00
bfredl
be463e7643
Merge pull request #25418 from bfredl/no_attr2
refactor(message): remove more "attr" variants
2023-09-29 20:07:16 +02:00
Dr. Matthew Swabey
54daf022ce
docs(term): use tic -x for better compatibility with old ncurses (#25421)
Use `tic -x` instead of `tic` to include any unknown capabilities in a modern `terminfo.src` as user-defined ones, instead of dropping them. Modern ncurses behavior with `tic -x` will not change.
2023-09-29 10:57:02 -05:00
bfredl
dd872cbb44
Merge pull request #25395 from bfredl/line_buf2
refactor(grid): unify the two put-text-on-the-screen code paths
2023-09-29 17:54:05 +02:00
Maria José Solano
9ed830a3ca
refactor(lsp): deprecate util methods (#25400) 2023-09-29 17:37:14 +02:00
bfredl
bc13bc154a refactor(message): smsg_attr -> smsg 2023-09-29 16:36:04 +02:00
bfredl
8e11c18d49 refactor(message): msg_puts_attr_len -> msg_puts_len 2023-09-29 16:10:28 +02:00
bfredl
b07fd0e988 refactor(message): msg_outtrans_long_len_attr -> msg_outtrans_long 2023-09-29 15:55:45 +02:00
bfredl
e33269578b refactor(grid): unify the two put-text-on-the-screen code paths
The screen grid refactors will continue until morale improves.
Jokes aside, this is quite a central installment in the series.

Before this refactor, there were two fundamentally distinct codepaths
for getting some text on the screen:

- the win_line() -> grid_put_linebuf() -> ui_line() call chain used for
  buffer text, with linebuf_char as a temporary scratch buffer
- the grid_line_start/grid_line_puts/grid_line_flush() -> ui_line()
  path used for every thing else: statuslines, messages and the command line.
  Here the grid->chars[] array itself doubles as a scratch buffer.

With this refactor, the later family of functions still exist, however
they now as well render to linebuf_char just like win_line() did, and
grid_put_linebuf() is called in the end to calculate delta changes.
This means we don't need any duplicate logic for delta calculations anymore.

Later down the line, it will be possible to share more logic operating
on this scratch buffer, like doing 'rightleft' reversal and arabic
shaping as a post-processing step.
2023-09-29 15:38:25 +02:00
dundargoc
af7d317f3f refactor: remove long
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
2023-09-29 14:56:34 +02:00
James McCoy
9afbfb4d64 fix(unittests): ignore __s128 and __u128 types in ffi
Linux added these types to their userspace headers in [6.5], which
causes unit tests to fail like

```
-------- Running tests from test/unit/api/private_helpers_spec.lua
RUN       vim_to_object converts true: 17.00 ms ERR
test/unit/helpers.lua:748: test/unit/helpers.lua:732: (string) '
test/unit/helpers.lua:264: ';' expected near '__s128' at line 194'
exit code: 256

stack traceback:
	test/unit/helpers.lua:748: in function 'itp_parent'
	test/unit/helpers.lua:784: in function <test/unit/helpers.lua:774>
```

Since we don't use these types, they can be ignored to avoid LuaJIT's C
parser choking on them.

[6.5]: 224d80c584
2023-09-28 22:36:14 -04:00
zeertzjq
b917db062f
vim-patch:02902b547bdb (#25406)
runtime(doc): text-objects: document how escaped delimiters are handled

02902b547b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-29 07:05:21 +08:00
zeertzjq
7ec20a4082
vim-patch:9.0.1950: Vim9: error codes spread out (#25405)
Problem:  Vim9: error codes spread out
Solution: group them together and reserve 100
          more for future use

Reserve 100 error codes for future enhancements to the Vim9 class
support

closes: vim/vim#13207

413f83990f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-29 06:52:02 +08:00
zeertzjq
1117d29b20
Merge pull request #25398 from zeertzjq/vim-9.0.1946
vim-patch:9.0.{0607,1946,1947}: filename expansion using ** in bash may fail
2023-09-29 06:51:08 +08:00
zeertzjq
3465e0daa0 vim-patch:9.0.1947: Bash Expansion test fails on Windows/MacOS
Problem:  Bash Expansion test fails on Windows/MacOS
Solution: Disable Test_glob_extended_bash for now

This test doesn't work on Windows even if bash can be executed, since
the globstar functionality has only been enabled in Unix builds of Vim
(Commit 9eb1ce531527a7177d16373b0f8689bbcd3d5f73, patch 9.0.1946).

closes: vim/vim#13205

03ca4002c1

Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-09-29 06:07:27 +08:00
zeertzjq
92e40f8d18 vim-patch:9.0.1946: filename expansion using ** in bash may fail
Problem:  filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting

Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays.  However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.

So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).

closes: vim/vim#13002
closes: vim/vim#13144

9eb1ce5315

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-29 06:07:27 +08:00
zeertzjq
7f58b2bb6a vim-patch:9.0.0607: verbose echo message test fails on Mac OS
Problem:    Verbose echo message test fails on Mac OS.
Solution:   Skip the test on Mac OS.

f802767df7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-09-29 06:07:27 +08:00
zeertzjq
28ffd96c9b
test: decoration provider with wrapped lines (#25404) 2023-09-28 20:20:25 +08:00
dundargoc
1913041518
docs: Lua docstrings guidance #25345
Recommend adding a space after i.e. `--- @see`.

The "space" variant is common for the vast majority of docstring formats
such as doxygen, javadoc and typescript.
2023-09-27 21:57:22 -07:00
bfredl
e46f5aab89
Merge pull request #25396 from bfredl/no_attr
refactor(messages): fold msg() functions with and without attr
2023-09-27 23:49:47 +02:00
zeertzjq
86b7d8a9f5
vim-patch:5277cfaf8afe (#25397)
runtime(doc): mention mouse scrolling in scrollbind-quickadj (vim/vim#13190)

5277cfaf8a
2023-09-28 05:22:09 +08:00
bfredl
448d4837be refactor(messages): rename msg_trunc_attr and msg_multiline_attr without attr 2023-09-27 23:05:14 +02:00
bfredl
b85f1dafc7 refactor(messages): fold msg_attr into msg
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
2023-09-27 22:50:49 +02:00
Christian Clason
1783023da7 vim-patch:54f70cf0780a
runtime(swayconfig): Update syntax file (vim/vim#13192)

54f70cf078

Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
2023-09-27 22:20:03 +02:00
Christian Clason
af1df3cb78 vim-patch:02774f99cebc
runtime(i3config): update i3config syntax (vim/vim#13191)

02774f99ce

Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
2023-09-27 22:20:03 +02:00
Christian Clason
555f492ec6 vim-patch:347459423903
runtime(rmd) Update ftplugin and syntax files (vim/vim#13193)

ftplugin/rmd.vim:

  - Set 'commentstring' dynamically according to code region.

syntax/rmd.vim:

  - Include syntax highlighting of fenced languages dynamically.
  - Add conceal char for line break.

3474594239

Co-authored-by: Jakson Alves de Aquino <jalvesaq@gmail.com>
2023-09-27 22:20:03 +02:00
bfredl
f91cd31d7d refactor(messages): fold msg_outtrans_attr into msg_outtrans
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
2023-09-27 21:46:39 +02:00
Rory Nesbitt
a66b0fdfaa
feat: NVIM_APPNAME supports relative paths #25233
Problem:
NVIM_APPNAME does not allow path separators in the name, so relative
paths can't be used:

    NVIM_APPNAME="neovim-configs/first-config" nvim
    NVIM_APPNAME="neovim-configs/second-config" nvim

Solution:
Let NVIM_APPNAME be a relative path. Absolute paths are not supported.

fix #23056
fix #24966
2023-09-27 10:09:55 -07:00
nwounkn
bfdec5b0e7
fix(clang): null pointer dereference in parse_msgpack #25389 2023-09-27 08:43:39 -07:00
bfredl
26d6f03023
Merge pull request #25374 from bfredl/batchupdate
refactor(grid): use batched updates for more things
2023-09-27 13:21:29 +02:00
zeertzjq
10e57ad4cb
vim-patch:8.2.3467: CursorHoldI event interferes with "CTRL-G U" (#25383)
Problem:    CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono)
Solution:   Restore the flag for "CTRL-G U" after triggering CursorHoldI.
            (closes vim/vim#8937)

5a9357d0bf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-09-27 18:58:43 +08:00
zeertzjq
b65f4151d9
vim-patch:8.2.3517: TextChanged does not trigger after TextChangedI (#25384)
Problem:    TextChanged does not trigger after TextChangedI.
Solution:   Store the tick separately for TextChangedI. (Christian Brabandt,
            closes vim/vim#8968, closes vim/vim#8932)

db3b44640d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-27 18:51:40 +08:00
bfredl
10cabf7877 refactor(grid): use batched updates for statusline and ruler 2023-09-27 11:31:45 +02:00
zeertzjq
dfa8b582a6
fix(extmarks): draw TAB in virt_text properly with 'rl' (#25381) 2023-09-27 10:48:14 +08:00
bfredl
0b2667ed36 refactor(grid): use batched updates for builtin tabline 2023-09-26 21:27:05 +02:00