Commit Graph

26883 Commits

Author SHA1 Message Date
Christian Clason
3a876bd41b vim-patch:535b9e12d02f
runtime(typescript): Fix highlighting symbols after number literal (vim/vim#12911)

fixes vim/vim#12831

535b9e12d0

Co-authored-by: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>
2023-08-28 11:03:37 +09:00
zeertzjq
656be8a591
vim-patch:9.0.1810: camel-case spelling has issues with digits (#24909)
Problem:  camel-case spelling has issues with digits
Solution: Improve the camCase spell checking by taking digits
          and caps into account

Rewrite the conditions to check for word boundaries by taking into
account the presence of digits and all-caps sequences such as acronyms.

closes: vim/vim#12644
closes: vim/vim#12933

d08745040b

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-28 07:16:15 +08:00
zeertzjq
6b12eda220
vim-patch:9.0.1798: The 'syntax' option has no completion. (#24908)
Problem:  The 'syntax' option has no completion.
Solution: Add syntax option completion.

closes: vim/vim#12900

6dfdff3f27

N/A patches:
vim-patch:9.0.1795: Indentation issues

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-28 07:07:50 +08:00
zeertzjq
d7d3d757c1
Merge pull request #24853 from zeertzjq/inline-virt-eol
fix(ui): wrong cursor position with left gravity inline virt text at eol
2023-08-28 06:36:51 +08:00
zeertzjq
062db5c136 vim-patch:9.0.1802: Multiline regex with Visual selection fails with virtual text
Problem:  Multiline regex with Visual selection fails when Visual
          selection contains virtual text after last char.
Solution: Only include virtual text after last char when getting full
          line length.

closes: vim/vim#12908

e3daa06be1
2023-08-28 06:10:36 +08:00
zeertzjq
c70aa84b2a vim-patch:9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem:  Cursor position still wrong with 'showbreak' and virtual text
          after last character or 'listchars' "eol".
Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also
          fix first char of virtual text not shown at the start of a screen
          line.

closes: vim/vim#12478
closes: vim/vim#12532
closes: vim/vim#12904

6a3897232a
2023-08-28 06:02:01 +08:00
zeertzjq
128091a256 fix(ui): wrong cursor position with left gravity inline virt text at eol 2023-08-28 05:51:01 +08:00
Lewis Russell
abb8c2c453 fix(editorconfig): do not set 'endofline'
Problem:
  'endofline' can be used to detect if a file ends of <EOL>, however
  editorconfig can break this.

Solution:
  Set 'endofline' during BufWritePre

Fixes: #24869
2023-08-27 19:27:25 +01:00
zhaozg
63802a1dbf docs: update luvref.txt for version info
fixup: #24874
2023-08-27 23:40:09 +09:00
Lewis Russell
a79694a08e feat(issue_template): instruct not to include a package manager 2023-08-27 13:22:05 +01:00
Lewis Russell
d3d7d763f3 feat(builtin): improve types 2023-08-27 13:07:04 +01:00
zeertzjq
1f49c98036
vim-patch:9.0.1792: problem with gj/gk/gM and virtual text (#24898)
Problem:  Normal mode "gM", "gj", "gk" commands behave incorrectly with
          virtual text.
Solution: Use linetabsize() instead of linetabsize_str().

closes: vim/vim#12909

d809c0a903
2023-08-27 20:04:44 +08:00
bfredl
4c69279f97
Merge pull request #24889 from bfredl/topline
fix(api): fix issues with nvim_buf_set_lines refactor
2023-08-27 13:56:20 +02:00
bfredl
840749d6c9 fix(undo): fix crash caused by checking undolevels in wrong buffer
fixes #24894
2023-08-27 12:08:11 +02:00
bfredl
9b9030ff2c fix(api): fix inconsistent behavior of topline touched in recent refactor
The change in #24824 0081549 was not a regression, however it was an
incomplete change. Unfortunately some common plugins come to depend on
this exising self-inconsistent behavior. These plugins are going to need
to update for 0.10

nvim_buf_set_lines used to NOT adjust the topline correctly if a buffer
was displayed in just one window. However, if displayed in multiple
windows, it was correctly adjusted for any window not deemed the
current window for the buffer (which could be an arbitrary choice if the
buffer was not already current, as noted in the last rafactor)

This fixes so that all windows have their topline adjusted. The added
tests show this behavior, which should be the reasonable one.
2023-08-27 12:07:46 +02:00
Maria José Solano
b7d5b55f74
fix(types): add some return/parameter type annotations (#24867)
* fix(types): add some return/parameter type annotations

* fix(types): narrow stdpath parameter further
2023-08-27 09:41:32 +01:00
Maria José Solano
2bf3e82676 fix(treesitter): validate window before updating preview highlights 2023-08-27 09:40:26 +01:00
Anatolii Sakhnik
fec51229c4
feat(l10n): update Ukrainian translations (#24882)
* optwin
* synchronize with Vim
2023-08-27 13:29:12 +08:00
Sanchayan Maity
874b8172a6 build(deps): bump tree-sitter-python to v0.20.4 2023-08-27 10:03:24 +09:00
zhaozg
c4728a5c46 build(deps): bump luv to HEAD dcd1a1c 2023-08-27 10:02:43 +09:00
julio-b
e8dd3fa280
refactor(buf_init_chartab): remove redundant loop (#24891) 2023-08-27 07:15:33 +08:00
bfredl
a6d0535c15
Merge pull request #24739 from echasnovski/win-footer
feature: add floating window footer text
2023-08-26 19:41:52 +02:00
Evgeni Chasnovski
986bf7e78d
feat(highlight): add FloatFooter highlight group
Problem: No clear separation of floating title and footer highlighting.

Solution: Add new `FloatFooter` highlight group.
2023-08-26 19:37:43 +03:00
Evgeni Chasnovski
35570e4a11
feat(float): implement footer
Problem: Now way to show text at the bottom part of floating window
  border (a.k.a. "footer").

Solution: Allows `footer` and `footer_pos` config fields similar to
  `title` and `title_pos`.
2023-08-26 19:37:43 +03:00
Evgeni Chasnovski
617fd5bdc6
refactor(float): extract "title" and "title_pos" handling 2023-08-26 19:37:18 +03:00
luukvbaal
afd0c648a8
fix(statuscolumn): force full redraw when signcolumn is invalid (#24859)
Fix #24655
2023-08-26 21:10:04 +08:00
bfredl
965ed579fe
Merge pull request #24399 from lambdalisue/fix-messagepack-rpc
feat(msgpack_rpc): add a new `msgpack-rpc` client type to fix behavior with MessagePack-RPC compliant clients
2023-08-26 13:39:31 +02:00
Ibby
362df0f793
fix(extmarks): wrong display when changing text with virt_lines (#24879) 2023-08-26 19:39:05 +08:00
bfredl
1bdcb9aaf1
Merge pull request #24824 from bfredl/nocurbuf
refactor(change): do API changes to buffer without curbuf switch
2023-08-26 12:35:22 +02:00
Alisue
b641fc3874
docs(megpack_rpc): add news entry for msgpack-rpc client type 2023-08-26 19:15:36 +09:00
Alisue
b46e93c5fd
docs(msgpack_rpc): add "msgpack-rpc" client type 2023-08-26 19:14:07 +09:00
Alisue
01fe6b9e6a
feat(msgpack_rpc): support out-of-order responses on msgpack-rpc
Added to support MessagePack-RPC fully compliant clients that do
not return responses in request order.

Although it is currently not an efficient implementation for full
compliance and full compliance cannot be guaranteed, the addition
of the new client type `msgpack-rpc` creates a situation where "if
the client type is `msgpack-rpc`, then backward compatibility is
ignored and full compliance with MessagePack- RPC compliance is
justified even if backward compatibility is ignored if the client
type is `msgpack-rpc`.
2023-08-26 19:14:06 +09:00
Alisue
deb6fd6704
feat(msgpack-rpc): show actual request id in error message 2023-08-26 19:14:05 +09:00
bfredl
0081549547 refactor(change): do API changes to buffer without curbuf switch
Most of the messy things when changing a non-current buffer is
not about the buffer, it is about windows. In particular, it is about
`curwin`.

When editing a non-current buffer which is displayed in some other
window in the current tabpage, one such window will be "borrowed" as the
curwin. But this means if two or more non-current windows displayed the buffers,
one of them will be treated differenty. this is not desirable.

In particular, with nvim_buf_set_text, cursor _column_ position was only
corrected for one single window. Two new tests are added: the test
with just one non-current window passes, but the one with two didn't.

Two corresponding such tests were also added for nvim_buf_set_lines.
This already worked correctly on master, but make sure this is
well-tested for future refactors.

Also, nvim_create_buf no longer invokes autocmds just because you happened
to use `scratch=true`. No option value was changed, therefore OptionSet
must not be fired.
2023-08-26 12:02:05 +02:00
zeertzjq
5bb17958c5
build: fix "make iwyu" not working (#24873) 2023-08-26 17:20:40 +08:00
zeertzjq
1635c9e75e
refactor: move some structs out of buffer_defs.h (#24878) 2023-08-26 11:13:20 +08:00
zeertzjq
b1cfb299df
docs: various clarifications (#24876) 2023-08-26 08:35:05 +08:00
Maria José Solano
5d8ab32f38
feat(treesitter): add a query editor (#24703) 2023-08-25 13:17:36 -05:00
zeertzjq
ecd99e7dd7
Merge pull request #24872 from zeertzjq/plines
some plines.c refactors
2023-08-25 20:55:13 +08:00
zeertzjq
ff67bb3d05 refactor(plines.c): deduplicate code for virtual text cursor offset 2023-08-25 20:20:42 +08:00
zeertzjq
93af6d9ed0 refactor: move virtcol functions to plines.c
Problem: Functions for virtcol and chartabsize are similar (both compute
horizontal size), but appear in two different source files.
Solution: Move virtcol functions to plines.c.
2023-08-25 20:17:26 +08:00
zeertzjq
f08648182b refactor(plines.c): move vertical size functions to the bottom
Problem: It may be unclear what "below" in first comment refers to.
Solution: Move vertical size functions to the bottom so that it can be
changed to "above".
2023-08-25 20:17:23 +08:00
Sean Dewar
d4dc52a835
Merge pull request #24821 from seandewar/vim-9f2962141514
vim-patch:9f2962141514,f6fb52b667ee,19968fc4ec2c,a76f3221cdcf,2ae7ffe0bc3c,3d3a9152fa6d - Termdebug stuff
2023-08-25 11:59:51 +01:00
Sean Dewar
0bd82b540e
refactor(termdebug): reindent some things
Mostly to make it more consistent and to match Vim more where applicable.
2023-08-25 11:24:52 +01:00
Sean Dewar
e3b385bed5
vim-patch:3d3a9152fa6d
runtime(termdebug): more termdebug fixes and improvements (vim/vim#12892)

- Fix and attempt to simplify :Frame/:Up/:Down documentation.

- Accept a count instead for :Up/:Down/+/-.

- Update the "Last Change" dates.

- Fix a missing :let (caused an error if gdb fails to start).

- Wipe the prompt buffer when ending prompt mode (if it exists and wasn't wiped
  by the user first). Avoids issues with stale prompt buffers (such as E95 when
  starting a new prompt mode session).

- Kill the gdb job if the prompt buffer is unloaded (similar to what's done for
  a terminal buffer). Fixes not being able to start a new termdebug session if
  the buffer was wiped by the user, for example.

3d3a9152fa
2023-08-25 11:05:18 +01:00
Sean Dewar
92ef2b2bcd
vim-patch:2ae7ffe0bc3c
runtime(termdebug): add frame related commands (vim/vim#12511)

implementing `:Frame`, `:Up` and `:Down'

2ae7ffe0bc

Use maparg() for saving K as it's since been ported (and supports Lua callbacks
and the other API fields).

Use the 3 argument variant of mapset(), as the single argument one isn't ported
yet (v8.2.4861).

Co-authored-by: Simon Sobisch <simonsobisch@web.de>
2023-08-25 11:05:18 +01:00
Sean Dewar
8aad4b8425
fix(termdebug): send SIGINT when interrupting prompt mode
Unlike Vim's job_stop(), Nvim's jobstop() does not take a signal argument, and
always sends SIGTERM/KILL.

:Stop and Ctrl-C in prompt mode is supposed to interrupt the program like in
terminal mode, not kill GDB.

Also, maybe libuv's kill() works on Windows? If so, the logic above could be
removed, but I don't have a Windows machine available to test that.

Also "set nomodified" when ending prompt mode, like Vim (avoids E37).
2023-08-25 11:04:41 +01:00
Sean Dewar
21477bdb27
vim-patch:a76f3221cdcf
runtime(termdebug): Fix various Termdebug issues (vim/vim#12875)

* Fix some Termdebug issues after vim/vim#12403
* Fix :Asm in Termdebug prompt mode
* Fix Termdebug s:DecodeMessage escaping logic

a76f3221cd

Adjust disassembly message forwarding for Nvim, as its callback can receive
many lines at once.

Currently, just forward each disassembly line individually to s:CommOutput();
it's possible to do this in batch instead, but this is simpler.

I suggested moving to a GDB MI-based approach for the disassemble stuff
upstream, which should simplify the logic a lot if implemented (and possibly
allow for getting rid of the `&"disassemble ...` special-casing).

Also, correct "(gdb)" to include a trailing space; the stray GDB prompts were
being ignored by s:CommOutput() anyway, so this had caused no ill effects.
2023-08-25 11:01:09 +01:00
Sean Dewar
c413b42c45
fix(termdebug): prompt mode breaks with &splitbelow set
Unlike Vim, termopen() doesn't split, so you can't use the modifier like that.
Remove the fragile :wincmd shenanigans.
2023-08-25 10:59:57 +01:00
Sean Dewar
af78060b18
fix(termdebug): trim suffixed "\r" in CommOutput
Vim splits lines on "\r", then trims any prefixed "\n".

But in Nvim, job output lines are split on "\n" (like readfile() in binary
mode), so trim any suffixed "\r" instead.

This gets rid of the trailing "^M" character in messages parsed from the jobs.
2023-08-25 10:59:56 +01:00