<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/man.lua, branch usermarks</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(man.lua): open in current window if it's already a man page (#21987)</title>
<updated>2023-01-25T14:39:25+00:00</updated>
<author>
<name>0xAdk</name>
<email>29005635+0xAdk@users.noreply.github.com</email>
</author>
<published>2023-01-25T14:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3c48d3c83fc21dbc0841f9210f04bdb073d73cd1'/>
<id>3c48d3c83fc21dbc0841f9210f04bdb073d73cd1</id>
<content type='text'>
This matters when there are multiple man page windows open.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matters when there are multiple man page windows open.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man.lua): use `env` command (#21007)</title>
<updated>2022-11-09T23:26:02+00:00</updated>
<author>
<name>euclidianAce</name>
<email>euclidianAce@protonmail.com</email>
</author>
<published>2022-11-09T23:26:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0faf007a236c9b51f151790f79ee59366b501c55'/>
<id>0faf007a236c9b51f151790f79ee59366b501c55</id>
<content type='text'>
Previously man.lua would use the `env` field in the parameters of
`vim.loop.spawn` to override things like MANPAGER. This caused issues on
NixOS since `spawn` will _override_ the environment rather than _append_
to it (and NixOS relies on a heavily modified environment). Using the
`env` command to append to the environment solves this issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously man.lua would use the `env` field in the parameters of
`vim.loop.spawn` to override things like MANPAGER. This caused issues on
NixOS since `spawn` will _override_ the environment rather than _append_
to it (and NixOS relies on a heavily modified environment). Using the
`env` command to append to the environment solves this issue.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man.lua): set modifiable before writing page (#20914)</title>
<updated>2022-11-03T01:13:29+00:00</updated>
<author>
<name>Kevin Hwang</name>
<email>kevin.hwang@live.com</email>
</author>
<published>2022-11-03T01:13:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cc5b7368d61cfcd775dd02803dbdb8d4d05b5d5d'/>
<id>cc5b7368d61cfcd775dd02803dbdb8d4d05b5d5d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man): handle absolute paths as `:Man` targets (#20624)</title>
<updated>2022-10-17T09:37:44+00:00</updated>
<author>
<name>Mahmoud Al-Qudsi</name>
<email>mqudsi@neosmart.net</email>
</author>
<published>2022-10-17T09:37:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=39911d76be560c998cc7dee51c5d94f811164f66'/>
<id>39911d76be560c998cc7dee51c5d94f811164f66</id>
<content type='text'>
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(cscope)!: remove</title>
<updated>2022-10-13T15:37:23+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-10-08T14:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=288208257c8d6b3c8dcce7ee6c7b6c7bb7bafb27'/>
<id>288208257c8d6b3c8dcce7ee6c7b6c7bb7bafb27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man): support MacOS 13</title>
<updated>2022-10-11T14:38:15+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-10-11T12:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=b126b118405b90c30c47119862e6c040738ac540'/>
<id>b126b118405b90c30c47119862e6c040738ac540</id>
<content type='text'>
MacOS 13 has changed its version of `man` to an version that doesn't
properly support `man -w` (without arguments). In order to workaround
this we simply fallback to $MANPATH.

Fixes #20579
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MacOS 13 has changed its version of `man` to an version that doesn't
properly support `man -w` (without arguments). In order to workaround
this we simply fallback to $MANPATH.

Fixes #20579
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(man): pass env directly to spawn() (#20591)</title>
<updated>2022-10-11T12:25:42+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-10-11T12:25:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cba05c541d613dc05916b262c0d7d3a10ec08c67'/>
<id>cba05c541d613dc05916b262c0d7d3a10ec08c67</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(tests): indicate in test logs when nvim exit times out</title>
<updated>2022-09-22T08:38:11+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-09-20T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=02f8ca59a80cd3570593c717ff6ceadc33239b89'/>
<id>02f8ca59a80cd3570593c717ff6ceadc33239b89</id>
<content type='text'>
When it happens it wastes 2 seconds which is NOT included in the
normal busted timing info. It is hard to correct this, but we
can at least print a warning when this happens.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When it happens it wastes 2 seconds which is NOT included in the
normal busted timing info. It is hard to correct this, but we
can at least print a warning when this happens.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): move compat module from runtime to test (#20257)</title>
<updated>2022-09-20T10:15:32+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-09-20T10:15:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=abe2d90693e5cec3428c0162c48f0ea38972ff31'/>
<id>abe2d90693e5cec3428c0162c48f0ea38972ff31</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 deal with number before :tab</title>
<updated>2022-09-02T14:28:57+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-09-01T10:46:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1ef7720567b08caec0c077605fb2a01a9d6eafbc'/>
<id>1ef7720567b08caec0c077605fb2a01a9d6eafbc</id>
<content type='text'>
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which
is the same as the number passed before :tab modifier instead of the
number plus 1, and "tab" value is -1 if :tab modifier is not used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which
is the same as the number passed before :tab modifier instead of the
number plus 1, and "tab" value is -1 if :tab modifier is not used.
</pre>
</div>
</content>
</entry>
</feed>
