<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/ex_cmds, branch userregs_2</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>fix(editor): respect [+cmd] when executing :drop #33339</title>
<updated>2025-04-08T12:54:32+00:00</updated>
<author>
<name>jyn</name>
<email>github@jyn.dev</email>
</author>
<published>2025-04-08T12:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3647b821ea69ea095ccc4bf8c265df474333a5d5'/>
<id>3647b821ea69ea095ccc4bf8c265df474333a5d5</id>
<content type='text'>
Problem:
Normally, `:drop +41 foo.txt` will open foo.txt with the cursor on line
41. But if foo.txt is already open, it instead is a no-op, even if the
cursor is on a different line.

Steps to reproduce:

    nvim --clean foo.txt
    :drop +30 foo.txt

Solution:
Handle +cmd in ex_drop().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Normally, `:drop +41 foo.txt` will open foo.txt with the cursor on line
41. But if foo.txt is already open, it instead is a no-op, even if the
cursor is on a different line.

Steps to reproduce:

    nvim --clean foo.txt
    :drop +30 foo.txt

Solution:
Handle +cmd in ex_drop().</pre>
</div>
</content>
</entry>
<entry>
<title>test: do not dedent() in feed() (#32884)</title>
<updated>2025-03-14T09:12:35+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-03-14T09:12:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a25ce5762de712e67db5c3dc0f2537894d5a4420'/>
<id>a25ce5762de712e67db5c3dc0f2537894d5a4420</id>
<content type='text'>
Most callers of feed() do not expect feed() to dedent.
Now use a literal space in tests where it looks better.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most callers of feed() do not expect feed() to dedent.
Now use a literal space in tests where it looks better.</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.2.4603: sourcing buffer lines is too complicated</title>
<updated>2025-02-28T10:21:08+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-04-24T08:20:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6750d00fe96a04ab19cfc55fb406f6b40dbf970f'/>
<id>6750d00fe96a04ab19cfc55fb406f6b40dbf970f</id>
<content type='text'>
Problem:    Sourcing buffer lines is too complicated.
Solution:   Simplify the code. Make it possible to source Vim9 script lines.
            (Yegappan Lakshmanan, closes vim/vim#9974)

https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194

This commit changes the behavior of sourcing buffer lines to always have
a script ID, although sourcing the same buffer always produces the same
script ID.

vim-patch:9.1.0372: Calling CLEAR_FIELD() on the same struct twice

Problem:  Calling CLEAR_FIELD() on the same struct twice.
Solution: Remove the second CLEAR_FIELD().  Move the assignment of
          cookie.sourceing_lnum (zeertzjq).

closes: vim/vim#14627

https://github.com/vim/vim/commit/f68517c1671dfedcc1555da50bc0b3de6d2842f6

Co-authored-by: Yegappan Lakshmanan &lt;yegappan@yahoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Sourcing buffer lines is too complicated.
Solution:   Simplify the code. Make it possible to source Vim9 script lines.
            (Yegappan Lakshmanan, closes vim/vim#9974)

https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194

This commit changes the behavior of sourcing buffer lines to always have
a script ID, although sourcing the same buffer always produces the same
script ID.

vim-patch:9.1.0372: Calling CLEAR_FIELD() on the same struct twice

Problem:  Calling CLEAR_FIELD() on the same struct twice.
Solution: Remove the second CLEAR_FIELD().  Move the assignment of
          cookie.sourceing_lnum (zeertzjq).

closes: vim/vim#14627

https://github.com/vim/vim/commit/f68517c1671dfedcc1555da50bc0b3de6d2842f6

Co-authored-by: Yegappan Lakshmanan &lt;yegappan@yahoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): wrong script context for option set by func from nvim_exec2 (#32659)</title>
<updated>2025-02-27T13:49:57+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-27T13:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=89d6d6f25cf22175e8c8eedef7181d8d618f9898'/>
<id>89d6d6f25cf22175e8c8eedef7181d8d618f9898</id>
<content type='text'>
Problem:  Wrong script context for option set by function defined by
          nvim_exec2 in a Lua script.
Solution: Call nlua_set_sctx() after adding SOURCING_LNUM and always set
          sc_lnum for a Lua script.

This is a bug discovered when testing #28486. Not sure if this actually
happens in practice, but it's easy to fix and required for #28486.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Wrong script context for option set by function defined by
          nvim_exec2 in a Lua script.
Solution: Call nlua_set_sctx() after adding SOURCING_LNUM and always set
          sc_lnum for a Lua script.

This is a bug discovered when testing #28486. Not sure if this actually
happens in practice, but it's easy to fix and required for #28486.</pre>
</div>
</content>
</entry>
<entry>
<title>test: option set by Lua autocommand has correct script context (#32652)</title>
<updated>2025-02-27T05:48:52+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-27T05:48:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=1e4c70803312cb4ae06cffb3de4a24105dd2a514'/>
<id>1e4c70803312cb4ae06cffb3de4a24105dd2a514</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: unreliable swapfile_preserve_recover_spec</title>
<updated>2025-02-26T22:06:22+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-26T21:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4a997a1732fdb7a1c99cadf780b789f1ac84d990'/>
<id>4a997a1732fdb7a1c99cadf780b789f1ac84d990</id>
<content type='text'>
Problem:
Test sometimes fails on bsd (cirrus ci):

    test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: retry() attempts: 464
    test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:590: Expected objects to be the same.
    Passed in:
    (table: 0x0d5f1aa44070) {
      [1] = ''
     *[2] = ''
      [3] = '[Process exited 1]' }
    Expected:
    (table: 0x0d5ea3eb8718) {
      [1] = ''
     *[2] = '[Process exited 1]'
      [3] = '' }
    stack traceback:
      test/testutil.lua:104: in function 'retry'
      test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: in function &lt;test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:556&gt;

Solution:
Filter out empty items to avoid irrelevant redraw-timing assumptions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Test sometimes fails on bsd (cirrus ci):

    test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: retry() attempts: 464
    test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:590: Expected objects to be the same.
    Passed in:
    (table: 0x0d5f1aa44070) {
      [1] = ''
     *[2] = ''
      [3] = '[Process exited 1]' }
    Expected:
    (table: 0x0d5ea3eb8718) {
      [1] = ''
     *[2] = '[Process exited 1]'
      [3] = '' }
    stack traceback:
      test/testutil.lua:104: in function 'retry'
      test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: in function &lt;test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:556&gt;

Solution:
Filter out empty items to avoid irrelevant redraw-timing assumptions.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): vim.text.indent()</title>
<updated>2025-02-26T22:06:22+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-21T01:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=be1fbe38b31b6046d396407c4efbf238941c6b08'/>
<id>be1fbe38b31b6046d396407c4efbf238941c6b08</id>
<content type='text'>
Problem:
Indenting text is a common task in plugins/scripts for
presentation/formatting, yet vim has no way of doing it (especially
"dedent", and especially non-buffer text).

Solution:
Introduce `vim.text.indent()`. It sets the *exact* indentation because
that's a more difficult (and thus more useful) task than merely
"increasing the current indent" (which is somewhat easy with a `gsub()`
one-liner).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Indenting text is a common task in plugins/scripts for
presentation/formatting, yet vim has no way of doing it (especially
"dedent", and especially non-buffer text).

Solution:
Introduce `vim.text.indent()`. It sets the *exact* indentation because
that's a more difficult (and thus more useful) task than merely
"increasing the current indent" (which is somewhat easy with a `gsub()`
one-liner).
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(eval): don't shorten $HOME in v:stacktrace (#32634)</title>
<updated>2025-02-26T07:33:11+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-26T07:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=b0a1d35f69b4cd94c46cf957ef45e4d239b0295e'/>
<id>b0a1d35f69b4cd94c46cf957ef45e4d239b0295e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): don't override script ID from :source (#32626)</title>
<updated>2025-02-25T23:40:21+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-25T23:40:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e2aca58bcc4f0aff8da9683194e4dc857a56118f'/>
<id>e2aca58bcc4f0aff8da9683194e4dc857a56118f</id>
<content type='text'>
Problem:  When setting an option, mapping etc. from Lua without -V1, the
          script ID is set to SID_LUA even if there already is a script
          ID assigned by :source.
Solution: Don't set script ID to SID_LUA if it is already a Lua script.
          Also add _editor.lua to ignorelist to make script context more
          useful when using vim.cmd().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  When setting an option, mapping etc. from Lua without -V1, the
          script ID is set to SID_LUA even if there already is a script
          ID assigned by :source.
Solution: Don't set script ID to SID_LUA if it is already a Lua script.
          Also add _editor.lua to ignorelist to make script context more
          useful when using vim.cmd().</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): don't override Vimscript SID (#32610)</title>
<updated>2025-02-25T01:17:51+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-25T01:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=095c0876c2010d6160df37cf057f2d0ad2c4501f'/>
<id>095c0876c2010d6160df37cf057f2d0ad2c4501f</id>
<content type='text'>
Problem:  When calling an API from Vimscript to set an option, mapping,
          etc., :verbose shows that it's set from an API client.
Solution: Don't override current_sctx.sc_sid when calling an API from
          Vimscript. Also fix the inverse case where API channel id is
          not set when calling an API from RPC. Move channel id into
          sctx_T to make saving and restoring easier.

Related #8329</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  When calling an API from Vimscript to set an option, mapping,
          etc., :verbose shows that it's set from an API client.
Solution: Don't override current_sctx.sc_sid when calling an API from
          Vimscript. Also fix the inverse case where API channel id is
          not set when calling an API from RPC. Move channel id into
          sctx_T to make saving and restoring easier.

Related #8329</pre>
</div>
</content>
</entry>
</feed>
