<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/buffer_spec.lua, branch tmp</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(api): fix nvim_buf_set_text heap-use-after-free (#19644)</title>
<updated>2022-08-05T22:22:01+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-08-05T22:22:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a308f53525d77e26c372af385f6f4d89638b3962'/>
<id>a308f53525d77e26c372af385f6f4d89638b3962</id>
<content type='text'>
The line returned but ml_get_buf() may be freed by another call to
ml_get_buf(), so it is necessary to make a copy.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The line returned but ml_get_buf() may be freed by another call to
ml_get_buf(), so it is necessary to make a copy.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): check for inclusive buffer line index out of bounds correctly (#19056)</title>
<updated>2022-06-23T13:38:00+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-06-23T13:38:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3c85fd817ee57793503b29202ce07166f0a48480'/>
<id>3c85fd817ee57793503b29202ce07166f0a48480</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api)!: correctly handle negative line numbers for nvim_buf_set_text (#17498)</title>
<updated>2022-02-23T22:19:47+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2022-02-23T22:19:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=15004473b531e37a6ff3aeca9e3bfeaaa1487d9e'/>
<id>15004473b531e37a6ff3aeca9e3bfeaaa1487d9e</id>
<content type='text'>
nvim_buf_set_text does not handle negative row numbers correctly: for
example,

    nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"})

should replace the 2nd to last line in the buffer with "Hello" and the
first 20 characters of the last line with "world". Instead, it reports
"start_row out of bounds". This happens because when negative line
numbers are used, they are incremented by one additional number to make
the non-negative line numbers end-exclusive. However, the line numbers
for nvim_buf_set_text should be end-inclusive.

In #15181 we handled this for nvim_buf_get_text by adding a new
parameter to `normalize_index`. We can solve the problem with
nvim_buf_set_text by simply availing ourselves of this new argument.

This is a breaking change, but makes the semantics of negative line
numbers much clearer and more obvious (as well as matching
nvim_buf_get_text).

BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative
line numbers will be off-by-one.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nvim_buf_set_text does not handle negative row numbers correctly: for
example,

    nvim_buf_set_text(0, -2, 0, -1, 20, {"Hello", "world"})

should replace the 2nd to last line in the buffer with "Hello" and the
first 20 characters of the last line with "world". Instead, it reports
"start_row out of bounds". This happens because when negative line
numbers are used, they are incremented by one additional number to make
the non-negative line numbers end-exclusive. However, the line numbers
for nvim_buf_set_text should be end-inclusive.

In #15181 we handled this for nvim_buf_get_text by adding a new
parameter to `normalize_index`. We can solve the problem with
nvim_buf_set_text by simply availing ourselves of this new argument.

This is a breaking change, but makes the semantics of negative line
numbers much clearer and more obvious (as well as matching
nvim_buf_get_text).

BREAKING CHANGE: Existing usages of nvim_buf_set_text that use negative
line numbers will be off-by-one.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): implement nvim_buf_get_text (#15181)</title>
<updated>2022-02-22T20:19:21+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2022-02-22T20:19:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=11f7aeed7aa83d342d19897d9a69ba9f32ece7f7'/>
<id>11f7aeed7aa83d342d19897d9a69ba9f32ece7f7</id>
<content type='text'>
nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from
nvim_buf_get_lines in that it allows retrieving only portions of lines.

While this can typically be done easily enough by API clients,
implementing this function provides symmetry between the get/set
text/lines APIs, and also provides a nice convenience that saves API
clients the work of having to slice the result of nvim_buf_get_lines
themselves.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from
nvim_buf_get_lines in that it allows retrieving only portions of lines.

While this can typically be done easily enough by API clients,
implementing this function provides symmetry between the get/set
text/lines APIs, and also provides a nice convenience that saves API
clients the work of having to slice the result of nvim_buf_get_lines
themselves.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): add nvim_get_option_value</title>
<updated>2021-12-04T21:04:23+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-10-12T04:09:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=71ac00ccb523383411b907b5fdf00a376e24a6f0'/>
<id>71ac00ccb523383411b907b5fdf00a376e24a6f0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api/marks)!: add opts param for feature extensibility (#16146)</title>
<updated>2021-11-01T13:46:26+00:00</updated>
<author>
<name>Javier Lopez</name>
<email>graulopezjavier@gmail.com</email>
</author>
<published>2021-11-01T13:46:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=961cd83b3b39855b232841f37ded856c8621bd90'/>
<id>961cd83b3b39855b232841f37ded856c8621bd90</id>
<content type='text'>
In the future we might want to extend the concept of named marks and
adding opts reduces the need of changing the function signature in the
furute.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the future we might want to extend the concept of named marks and
adding opts reduces the need of changing the function signature in the
furute.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): named marks set, get, delete #15346</title>
<updated>2021-10-05T15:49:20+00:00</updated>
<author>
<name>Javier Lopez</name>
<email>graulopezjavier@gmail.com</email>
</author>
<published>2021-10-05T15:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=49fdc62114a5f37def3ff60ca0c4d8638903ac24'/>
<id>49fdc62114a5f37def3ff60ca0c4d8638903ac24</id>
<content type='text'>
Adds the following API functions.

- nvim_buf_set_mark(buf, name, line, col)
  * Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
  * Delete a mark that belongs to buffer.
- nvim_del_mark(name)
  * Delete a global mark.
- nvim_get_mark(name)
  * Get a global mark.

Tests:

- Adds test to all the new api functions, and adds more for the existing
  nvim_buf_get_mark.
    * Tests include failure cases.

Documentation:

- Adds documentation for all the new functions, and improves the
  existing fucntion docs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the following API functions.

- nvim_buf_set_mark(buf, name, line, col)
  * Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
  * Delete a mark that belongs to buffer.
- nvim_del_mark(name)
  * Delete a global mark.
- nvim_get_mark(name)
  * Get a global mark.

Tests:

- Adds test to all the new api functions, and adds more for the existing
  nvim_buf_get_mark.
    * Tests include failure cases.

Documentation:

- Adds documentation for all the new functions, and improves the
  existing fucntion docs.</pre>
</div>
</content>
</entry>
<entry>
<title>correctly mark changed regions for set_text</title>
<updated>2021-02-07T21:50:29+00:00</updated>
<author>
<name>chentau</name>
<email>tchen1998@gmail.com</email>
</author>
<published>2021-02-07T21:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=05605bfc05054fa7bbeb5ed2412e5ef58721cfa4'/>
<id>05605bfc05054fa7bbeb5ed2412e5ef58721cfa4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>api: set_text: more tests, and fixing lint</title>
<updated>2021-01-01T18:51:58+00:00</updated>
<author>
<name>chentau</name>
<email>tchen1998@gmail.com</email>
</author>
<published>2020-12-22T02:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f7d01a65d50a4783527acd2de3998b65e7b78331'/>
<id>f7d01a65d50a4783527acd2de3998b65e7b78331</id>
<content type='text'>
removing pending virtcol tests

Allow passing in empty array as a shorthand for array with empty string; add more documentation

add check for start_row as well
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
removing pending virtcol tests

Allow passing in empty array as a shorthand for array with empty string; add more documentation

add check for start_row as well
</pre>
</div>
</content>
</entry>
<entry>
<title>api: set_text: rebase, update to new api, and add more tests</title>
<updated>2021-01-01T18:51:45+00:00</updated>
<author>
<name>Tony Chen</name>
<email>tchen1998@gmail.com</email>
</author>
<published>2020-12-22T01:51:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=45b14f88db1b332938f4a73be28966ae60563a50'/>
<id>45b14f88db1b332938f4a73be28966ae60563a50</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
