Browse Source

neovim: Try termxux clipboard before tmux

Fixes #1828.
android-5
Fredrik Fornwall 7 years ago
parent
commit
cfc93cb35a
  1. 10
      packages/neovim/build.sh
  2. 16
      packages/neovim/runtime-autoload-provider-clipboard.vim.patch

10
packages/neovim/build.sh

@ -1,8 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://neovim.io/ TERMUX_PKG_HOMEPAGE=https://neovim.io/
TERMUX_PKG_DESCRIPTION="Ambitious Vim-fork focused on extensibility and agility (nvim)" TERMUX_PKG_DESCRIPTION="Ambitious Vim-fork focused on extensibility and agility (nvim)"
local _COMMIT=eacd788cf56fee586901f4252ae7492aaf007b3f local _COMMIT=b57d9a4ff08fc1ef8db79d422b441b792493ff4e
TERMUX_PKG_VERSION=0.2.2~2017.11.16 TERMUX_PKG_VERSION=0.2.3~2017.11.25
TERMUX_PKG_SHA256=bcbbde12729a86f3952daf363826ea70d5ee9fc9126eca6e5474beacb8cd35d1 TERMUX_PKG_SHA256=356f04786e443c387f44bd4946067a87bcb50534896dd55f86d4ab61b51c1711
TERMUX_PKG_SRCURL=https://github.com/neovim/neovim/archive/${_COMMIT}.zip TERMUX_PKG_SRCURL=https://github.com/neovim/neovim/archive/${_COMMIT}.zip
TERMUX_PKG_DEPENDS="libuv, libmsgpack, libandroid-support, libvterm, libtermkey, libutil, liblua, libunibilium" TERMUX_PKG_DEPENDS="libuv, libmsgpack, libandroid-support, libvterm, libtermkey, libutil, liblua, libunibilium"
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
@ -24,9 +24,7 @@ termux_step_host_build () {
mkdir -p $TERMUX_PKG_HOSTBUILD_DIR/deps mkdir -p $TERMUX_PKG_HOSTBUILD_DIR/deps
cd $TERMUX_PKG_HOSTBUILD_DIR/deps cd $TERMUX_PKG_HOSTBUILD_DIR/deps
cmake \ cmake $TERMUX_PKG_SRCDIR/third-party
-DENABLE_JEMALLOC=OFF \
$TERMUX_PKG_SRCDIR/third-party
make -j 1 make -j 1
cd $TERMUX_PKG_SRCDIR cd $TERMUX_PKG_SRCDIR

16
packages/neovim/runtime-autoload-provider-clipboard.vim.patch

@ -1,16 +1,16 @@
diff -u -r ../neovim-76ea97c809e50fccc5ca6615943ac6da1db1e030/runtime/autoload/provider/clipboard.vim ./runtime/autoload/provider/clipboard.vim diff -u -r ../neovim-b57d9a4ff08fc1ef8db79d422b441b792493ff4e/runtime/autoload/provider/clipboard.vim ./runtime/autoload/provider/clipboard.vim
--- ../neovim-76ea97c809e50fccc5ca6615943ac6da1db1e030/runtime/autoload/provider/clipboard.vim 2017-06-19 00:01:29.000000000 +0000 --- ../neovim-b57d9a4ff08fc1ef8db79d422b441b792493ff4e/runtime/autoload/provider/clipboard.vim 2017-11-25 22:22:46.000000000 +0000
+++ ./runtime/autoload/provider/clipboard.vim 2017-06-19 20:10:55.376978820 +0000 +++ ./runtime/autoload/provider/clipboard.vim 2017-11-25 22:51:34.076263411 +0000
@@ -90,6 +90,12 @@ @@ -103,6 +103,12 @@
let s:copy['*'] = s:copy['+'] let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+'] let s:paste['*'] = s:paste['+']
return 'tmux' return 'win32yank'
+ elseif executable('termux-clipboard-set') + elseif executable('termux-clipboard-set')
+ let s:copy['+'] = 'termux-clipboard-set' + let s:copy['+'] = 'termux-clipboard-set'
+ let s:paste['+'] = 'termux-clipboard-get' + let s:paste['+'] = 'termux-clipboard-get'
+ let s:copy['*'] = s:copy['+'] + let s:copy['*'] = s:copy['+']
+ let s:paste['*'] = s:paste['+'] + let s:paste['*'] = s:paste['+']
+ return 'termux-clipboard' + return 'termux-clipboard'
endif elseif exists('$TMUX') && executable('tmux')
let s:copy['+'] = 'tmux load-buffer -'
let s:err = 'clipboard: No clipboard tool available. :help clipboard' let s:paste['+'] = 'tmux save-buffer -'

Loading…
Cancel
Save