<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/unit, branch master</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>vim-patch:8.2.1473: items in a list given to :const can still be modified</title>
<updated>2021-09-15T23:13:41+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-07-30T23:20:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9e38c4a79fe0351e9e18bc57cf48b960e8d31e88'/>
<id>9e38c4a79fe0351e9e18bc57cf48b960e8d31e88</id>
<content type='text'>
Problem:    Items in a list given to :const can still be modified.
Solution:   Work like ":lockvar! name" but don't lock referenced items.
            Make locking a blob work.
https://github.com/vim/vim/commit/021bda56710d98c09a6b35610a476ab2dd8c58ad
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Items in a list given to :const can still be modified.
Solution:   Work like ":lockvar! name" but don't lock referenced items.
            Make locking a blob work.
https://github.com/vim/vim/commit/021bda56710d98c09a6b35610a476ab2dd8c58ad
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.2.0886: cannot use octal numbers in scriptversion 4</title>
<updated>2021-09-11T14:36:03+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-06-03T00:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=90a4cf92d21b730fea7099fb3e12a9ef791a1a57'/>
<id>90a4cf92d21b730fea7099fb3e12a9ef791a1a57</id>
<content type='text'>
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes vim/vim#5304)
https://github.com/vim/vim/commit/c17e66c5c0acd5038f1eb3d7b3049b64bb6ea30b

:scriptversion is N/A.

Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
 - v8.2.2324
 - https://github.com/vim/vim/commit/2346a6378483c9871016f9fc821ec5cbea638f13
 - https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33
 - https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a

Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.

Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.

This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes vim/vim#5304)
https://github.com/vim/vim/commit/c17e66c5c0acd5038f1eb3d7b3049b64bb6ea30b

:scriptversion is N/A.

Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
 - v8.2.2324
 - https://github.com/vim/vim/commit/2346a6378483c9871016f9fc821ec5cbea638f13
 - https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33
 - https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a

Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.

Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.

This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2036: the str2nr() tests fail</title>
<updated>2021-09-11T14:33:20+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-05-22T19:21:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=b6d9e92805b4cf37680be61c1c22ddf7a061d649'/>
<id>b6d9e92805b4cf37680be61c1c22ddf7a061d649</id>
<content type='text'>
Problem:    The str2nr() tests fail.
Solution:   Add missing part of patch.
https://github.com/vim/vim/commit/1ac90b4fa63414d56750559506a3e076df6923b0

Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the
included ones in this patch are somewhat lacking.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    The str2nr() tests fail.
Solution:   Add missing part of patch.
https://github.com/vim/vim/commit/1ac90b4fa63414d56750559506a3e076df6923b0

Add extra tests for quoted numbers in vim_str2nr_spec.lua, as the
included ones in this patch are somewhat lacking.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.1355: obvious mistakes are accepted as valid expressions</title>
<updated>2021-09-11T14:33:19+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-05-30T21:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=34cb0879551b8217db820f684d913a393f4f38cb'/>
<id>34cb0879551b8217db820f684d913a393f4f38cb</id>
<content type='text'>
Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes vim/vim#3981)
https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685

Update vim_str2nr_spec.lua to add more tests that use strict = true.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes vim/vim#3981)
https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685

Update vim_str2nr_spec.lua to add more tests that use strict = true.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #15386 from jamessan/32-bit-revert</title>
<updated>2021-08-16T11:29:17+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2021-08-16T11:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=57fc3d3ed723a909147556a07fd53ed85de6a788'/>
<id>57fc3d3ed723a909147556a07fd53ed85de6a788</id>
<content type='text'>
Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)"</title>
<updated>2021-08-16T04:02:22+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2021-08-16T04:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c417d573a317087886f0efab8eecf1713d71792e'/>
<id>c417d573a317087886f0efab8eecf1713d71792e</id>
<content type='text'>
This reverts commit ed11721b6bb36042ab065b5045c8eb01115b8902.

It broke multiple 32-bit builds and isn't actually required for building
in a true x86 32-bit environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ed11721b6bb36042ab065b5045c8eb01115b8902.

It broke multiple 32-bit builds and isn't actually required for building
in a true x86 32-bit environment.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(highlight): remove syncolor.vim</title>
<updated>2021-07-27T20:14:30+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-07-27T16:46:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9afa0d25a66f849452f498bd45e2f443f5010635'/>
<id>9afa0d25a66f849452f498bd45e2f443f5010635</id>
<content type='text'>
Remove syncolor.vim in favor of defining the default highlight groups
directly in `init_highlight`. This approach provides a number of
advantages:

1. The highlights are always defined, regardless of whether or not the
   syntax regex engine is enabled.
2. Redundant sourcing of syntax files is eliminated (syncolor.vim was
   often sourced multiple times based on how the user's colorscheme file
   was written).
3. The syntax highlighting regex engine and the highlight groups
   themselves are more fully decoupled.
4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy
   (they now both do the same thing).

This approach also correctly solves a number of bugs related to
highlighting (#15176, #12573, #15205).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove syncolor.vim in favor of defining the default highlight groups
directly in `init_highlight`. This approach provides a number of
advantages:

1. The highlights are always defined, regardless of whether or not the
   syntax regex engine is enabled.
2. Redundant sourcing of syntax files is eliminated (syncolor.vim was
   often sourced multiple times based on how the user's colorscheme file
   was written).
3. The syntax highlighting regex engine and the highlight groups
   themselves are more fully decoupled.
4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy
   (they now both do the same thing).

This approach also correctly solves a number of bugs related to
highlighting (#15176, #12573, #15205).
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(undo): don't assume curbuf in u_compute_hash</title>
<updated>2021-07-09T13:36:07+00:00</updated>
<author>
<name>Thomas Vigouroux</name>
<email>tomvig38@gmail.com</email>
</author>
<published>2021-07-09T13:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ff53c5585f46bed9622bd4a3071c8cf3db96a9ac'/>
<id>ff53c5585f46bed9622bd4a3071c8cf3db96a9ac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.0897: can modify a:000 when using a reference (#14902)</title>
<updated>2021-06-26T14:19:09+00:00</updated>
<author>
<name>Jan Edmund Lazo</name>
<email>jan.lazo@mail.utoronto.ca</email>
</author>
<published>2021-06-26T14:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=20dc3f1989dca8aa9b64970f3799e4f48ac080c8'/>
<id>20dc3f1989dca8aa9b64970f3799e4f48ac080c8</id>
<content type='text'>
Problem:    Can modify a:000 when using a reference.
Solution:   Make check for locked variable stricter. (Ozaki Kiichi,
            closes vim/vim#3930)
https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Can modify a:000 when using a reference.
Solution:   Make check for locked variable stricter. (Ozaki Kiichi,
            closes vim/vim#3930)
https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788</pre>
</div>
</content>
</entry>
<entry>
<title>extmark: fix deletable nodes in MarkTree sometimes getting skipped</title>
<updated>2021-06-22T08:32:46+00:00</updated>
<author>
<name>snezhniylis</name>
<email>noreply@snezhniylis.dev</email>
</author>
<published>2021-06-04T10:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=43479f0ad6343ee04e0dd2a0251000cae1948bfd'/>
<id>43479f0ad6343ee04e0dd2a0251000cae1948bfd</id>
<content type='text'>
As per #14236, performing extmark cleanup in a certain namespace does
not guarantee removing all the extmarks inside given namespace.
The issue resides within the tree node removal method and results in
a couple of rare edge cases.

To demonstrate what causes this bug, I'll give an example covering one
of the edge cases.

=== AN EXAMPLE ===

   (A)         (B)         (C)         (D)         (E)
---------   ---------   ---------   ---------   ---------
  &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;
  &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;
  &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;
  &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;
  &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;
  &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;
  &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;
  &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;
  &lt;0, 9&gt;      &lt;0, 9&gt; *           *    &lt;0, 9&gt;  *   &lt;0, 9&gt;
[0, 10] *   [0, 10]     &lt;0, 9&gt;        [0, 11]     [0, 11]
  [0, 11]     [0, 11]     [0, 11]     [0, 12]     [0, 12]  *
  [0, 12]     [0, 12]     [0, 12]     [0, 13]     [0, 13]
  [0, 13]     [0, 13]     [0, 13]     [0, 14]     [0, 14]
  [0, 14]     [0, 14]     [0, 14]     [0, 15]     [0, 15]
  [0, 15]     [0, 15]     [0, 15]     [0, 16]     [0, 16]
  [0, 16]     [0, 16]     [0, 16]     [0, 17]     [0, 17]
  [0, 17]     [0, 17]     [0, 17]     [0, 18]     [0, 18]
  [0, 18]     [0, 18]     [0, 18]     [0, 19]     [0, 19]
  [0, 19]     [0, 19]     [0, 19]   [0, 20]     [0, 20]
[0, 20]     [0, 20]     [0, 20]

DIAGRAM EXPLANATION

* Every column is a state of the marktree at a certain stage.

* To make it simple, I don't draw the whole tree. What you see are
   2 leftmost parent nodes ([0, 10], [0, 20]) and their children placed
   in order `MarkTreeIter` would iterate through. From top to bottom.

* Numbers on this diagram represent extmark coordinates. Relative
   positioning and actual mark IDs used by the marktree are avoided
   for simplicity.

* 2 types of brackets around coordinates represent 2 different
   extmark namespaces (`ns_id`s).

* '*' shows iterator position.

ACTUAL EXPLANATION

Let's assume, we have two sets of extmarks from 2 different plugins:
  * Plugin1: &lt;0, 1-9&gt;
  * Plugin2: [0, 10-20]

1. Plugin2 calls
    `vim.api.nvim_buf_clear_namespace(buf_handle, ns_id, 0, -1)`
    to clear all its extmarks which results in `extmark_clear` call.

2. The iteration process goes on ignoring extmarks with irrelevant
    `ns_id` from Plugin1, until it reaches [0, 10], entering state (A).

3. At the end of cleaning up process, `marktree_del_itr` gets called.
    This function is supposed to remove given node and, if necessary,
    restructure the tree. Also, move the iterator to the next node.
    The bug occurs in this function.

4. The iterator goes backwards to the node's last child, to put it
    in the place of its deleted parent later. (B)

5. The parent node is deleted and replaced with its child node. (C)

6. Since now this node has 8 children, which is less than
    `MT_BRANCH_FACTOR - 1`, it get's merged with the next node. (D)

7. Finally, since at (B) the iterator went backward, it goes forward
    twice, skipping [0, 11] node, causing this extmark to persist,
    causing the bug. (E)

ANALYSIS AND SOLUTION

The algorithm works perfectly when the parent node gets replaced by
its child, but no merging occurs. I.e. the exact same diagram,
but without the (D) stage. If not for (D), it would iterate to &lt;0, 9&gt;
and then to [0, 11]. So, iterating twice makes sense. The actual problem
is in (C) stage, because the iterator index isn't adjusted and still
pointing to no longer existent node. So my solution is to adjust
iterator index after removing the child node.

More info: https://github.com/neovim/neovim/pull/14719
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As per #14236, performing extmark cleanup in a certain namespace does
not guarantee removing all the extmarks inside given namespace.
The issue resides within the tree node removal method and results in
a couple of rare edge cases.

To demonstrate what causes this bug, I'll give an example covering one
of the edge cases.

=== AN EXAMPLE ===

   (A)         (B)         (C)         (D)         (E)
---------   ---------   ---------   ---------   ---------
  &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;      &lt;0, 1&gt;
  &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;      &lt;0, 2&gt;
  &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;      &lt;0, 3&gt;
  &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;      &lt;0, 4&gt;
  &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;      &lt;0, 5&gt;
  &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;      &lt;0, 6&gt;
  &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;      &lt;0, 7&gt;
  &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;      &lt;0, 8&gt;
  &lt;0, 9&gt;      &lt;0, 9&gt; *           *    &lt;0, 9&gt;  *   &lt;0, 9&gt;
[0, 10] *   [0, 10]     &lt;0, 9&gt;        [0, 11]     [0, 11]
  [0, 11]     [0, 11]     [0, 11]     [0, 12]     [0, 12]  *
  [0, 12]     [0, 12]     [0, 12]     [0, 13]     [0, 13]
  [0, 13]     [0, 13]     [0, 13]     [0, 14]     [0, 14]
  [0, 14]     [0, 14]     [0, 14]     [0, 15]     [0, 15]
  [0, 15]     [0, 15]     [0, 15]     [0, 16]     [0, 16]
  [0, 16]     [0, 16]     [0, 16]     [0, 17]     [0, 17]
  [0, 17]     [0, 17]     [0, 17]     [0, 18]     [0, 18]
  [0, 18]     [0, 18]     [0, 18]     [0, 19]     [0, 19]
  [0, 19]     [0, 19]     [0, 19]   [0, 20]     [0, 20]
[0, 20]     [0, 20]     [0, 20]

DIAGRAM EXPLANATION

* Every column is a state of the marktree at a certain stage.

* To make it simple, I don't draw the whole tree. What you see are
   2 leftmost parent nodes ([0, 10], [0, 20]) and their children placed
   in order `MarkTreeIter` would iterate through. From top to bottom.

* Numbers on this diagram represent extmark coordinates. Relative
   positioning and actual mark IDs used by the marktree are avoided
   for simplicity.

* 2 types of brackets around coordinates represent 2 different
   extmark namespaces (`ns_id`s).

* '*' shows iterator position.

ACTUAL EXPLANATION

Let's assume, we have two sets of extmarks from 2 different plugins:
  * Plugin1: &lt;0, 1-9&gt;
  * Plugin2: [0, 10-20]

1. Plugin2 calls
    `vim.api.nvim_buf_clear_namespace(buf_handle, ns_id, 0, -1)`
    to clear all its extmarks which results in `extmark_clear` call.

2. The iteration process goes on ignoring extmarks with irrelevant
    `ns_id` from Plugin1, until it reaches [0, 10], entering state (A).

3. At the end of cleaning up process, `marktree_del_itr` gets called.
    This function is supposed to remove given node and, if necessary,
    restructure the tree. Also, move the iterator to the next node.
    The bug occurs in this function.

4. The iterator goes backwards to the node's last child, to put it
    in the place of its deleted parent later. (B)

5. The parent node is deleted and replaced with its child node. (C)

6. Since now this node has 8 children, which is less than
    `MT_BRANCH_FACTOR - 1`, it get's merged with the next node. (D)

7. Finally, since at (B) the iterator went backward, it goes forward
    twice, skipping [0, 11] node, causing this extmark to persist,
    causing the bug. (E)

ANALYSIS AND SOLUTION

The algorithm works perfectly when the parent node gets replaced by
its child, but no merging occurs. I.e. the exact same diagram,
but without the (D) stage. If not for (D), it would iterate to &lt;0, 9&gt;
and then to [0, 11]. So, iterating twice makes sense. The actual problem
is in (C) stage, because the iterator index isn't adjusted and still
pointing to no longer existent node. So my solution is to adjust
iterator index after removing the child node.

More info: https://github.com/neovim/neovim/pull/14719
</pre>
</div>
</content>
</entry>
</feed>
