Skip to content

Commit fd88be6

Browse files
committed
enhance(main/neovim{,-nightly}): document has('termux') feature flag
1 parent 4ce5ada commit fd88be6

6 files changed

Lines changed: 41 additions & 15 deletions

File tree

packages/neovim-nightly/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, VIM License"
44
TERMUX_PKG_LICENSE_FILE="LICENSE.txt"
55
TERMUX_PKG_MAINTAINER="Joshua Kahn <tom@termux.dev>"
66
TERMUX_PKG_VERSION="0.12.0~dev-2435+g18c5f06c9f"
7+
TERMUX_PKG_REVISION=1
78
TERMUX_PKG_SRCURL="https://github.com/neovim/neovim/archive/${TERMUX_PKG_VERSION##*+g}.tar.gz"
89
TERMUX_PKG_SHA256=3518260bbe8e755204b8d6fc25d1238be940b7138792fa3934022450c8a959cd
910
TERMUX_PKG_REPOLOGY_METADATA_VERSION="${TERMUX_PKG_VERSION%%~*}"
@@ -97,6 +98,11 @@ termux_step_pre_configure() {
9798
test -f "$patch" && sed \
9899
-e "s%\@TARGET\@%${target}%g" \
99100
"$patch" | patch --silent -p1
101+
102+
# Regenerate the docs to include our added `:h termux` and `:h android` tags.
103+
termux_setup_cmake
104+
echo "Regenerating docs:"
105+
make doc
100106
}
101107

102108
termux_step_post_make_install() {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../neovim/has-termux.patch

packages/neovim-nightly/src-nvim-eval-funcs.c.patch

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/neovim/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, VIM License"
44
TERMUX_PKG_LICENSE_FILE="LICENSE.txt"
55
TERMUX_PKG_MAINTAINER="Joshua Kahn <tom@termux.dev>"
66
TERMUX_PKG_VERSION="0.11.6"
7-
TERMUX_PKG_REVISION=2
7+
TERMUX_PKG_REVISION=3
88
TERMUX_PKG_SRCURL="https://github.com/neovim/neovim/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
99
TERMUX_PKG_SHA256=d1c8e3f484ed1e231fd5f48f53b7345b628e52263d5eef489bb8b73ca8d90fca
1010
TERMUX_PKG_DEPENDS="libandroid-support, libiconv, libmsgpack, libunibilium, libuv, libvterm (>= 1:0.3-0), lua51-lpeg, luajit, luv, tree-sitter, tree-sitter-parsers, utf8proc"
@@ -67,6 +67,11 @@ termux_step_pre_configure() {
6767
test -f "$patch" && sed \
6868
-e "s%\@TARGET\@%${target}%g" \
6969
"$patch" | patch --silent -p1
70+
71+
# Regenerate the docs to include our added `:h termux` and `:h android` tags.
72+
termux_setup_cmake
73+
echo "Regenerating docs:"
74+
make doc
7075
}
7176

7277
termux_step_post_make_install() {

packages/neovim/has-termux.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
2+
index 73367ee86b..1c57e0c556 100644
3+
--- a/src/nvim/eval.lua
4+
+++ b/src/nvim/eval.lua
5+
@@ -5144,6 +5144,10 @@ M.funcs = {
6+
win32 Windows system (32 or 64 bit).
7+
win64 Windows system (64 bit).
8+
wsl WSL (Windows Subsystem for Linux) system.
9+
+ android Alias for has('termux')
10+
+ termux Termux environment (The *termux* and *android*
11+
+ feature flags are {included additionally}
12+
+ in Termux's Neovim package.)
13+
14+
*has-patch*
15+
3. Vim patch. For example the "patch123" feature means that
16+
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
17+
index 752b367f63..349b7c3a9e 100644
18+
--- a/src/nvim/eval/funcs.c
19+
+++ b/src/nvim/eval/funcs.c
20+
@@ -3087,6 +3087,8 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
21+
#ifdef _WIN64
22+
"win64",
23+
#endif
24+
+ "android",
25+
+ "termux",
26+
#ifndef CASE_INSENSITIVE_FILENAME
27+
"fname_case",
28+
#endif

packages/neovim/src-nvim-eval-funcs.c.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)