Merge branch 'master' into plug-manager

This commit is contained in:
daa 2017-10-14 14:54:48 +03:00
commit 35d9592b9b
2 changed files with 20 additions and 31 deletions

View File

@ -29,19 +29,14 @@ Or to some custom path:
make PREFIX=/some/custom/path install
```
## Ubuntu snap package
Not usable for now due to some limitation!
This package also includes neovim, so neovim not needed and if present in system - not used. Install command:
## archlinux
AUR package for neovim-gtk https://aur.archlinux.org/packages/neovim-gtk-git
```shell
git clone https://aur.archlinux.org/neovim-gtk-git.git
cd neovim-gtk-git
makepkg -si
```
sudo snap install nvim-gtk --channel=candidate
```
There is some limitation for package: only `/home` directory available for editing and '~' is mapped to snap home directory.
Config files must be placed in `~/snap/nvim-gtk/common/config/nvim/[g]init.vim` directory
Run command: `nvim-gtk <file_name>` or from dash: `NeovimGtk`.
To run neovim provided by snap package execute: `nvim-gtk.neovim`.
# Build
## Linux

View File

@ -333,7 +333,7 @@ impl State {
let nvim = self.nvim();
if let Some(mut nvim) = nvim {
if self.mode.is(&mode::NvimMode::Insert) || self.mode.is(&mode::NvimMode::Normal) {
let paste_code = format!("normal! \"{}p", clipboard);
let paste_code = format!("normal! \"{}P", clipboard);
nvim.command(&paste_code).report_err(&mut *nvim);
} else {
let paste_code = format!("<C-r>{}", clipboard);
@ -766,25 +766,19 @@ fn init_nvim_async(
});
// attach ui
let mut nvim = Some(nvim);
glib::idle_add(move || {
let mut nvim = nvim.take().unwrap();
if let Err(err) = nvim::post_start_init(
&mut nvim,
options.open_path.as_ref(),
cols as u64,
rows as u64,
)
{
show_nvim_init_error(&err, state_arc.clone());
} else {
let mut state = state_arc.borrow_mut();
state.nvim.borrow_mut().set_initialized(nvim);
state.cursor.as_mut().unwrap().start();
}
Continue(false)
});
if let Err(err) = nvim::post_start_init(
&mut nvim,
options.open_path.as_ref(),
cols as u64,
rows as u64,
)
{
show_nvim_init_error(&err, state_arc.clone());
} else {
let mut state = state_arc.borrow_mut();
state.nvim.borrow_mut().set_initialized(nvim);
state.cursor.as_mut().unwrap().start();
}
}
fn draw_initializing(state: &State, ctx: &cairo::Context) {