@ -21,7 +21,6 @@ use crate::settings::*;
use crate ::{ cmd_line ::CmdLineSettings , error_handling ::ResultPanicExplanation } ;
pub use events ::* ;
use handler ::NeovimHandler ;
use regex ::Regex ;
pub use tx_wrapper ::{ TxWrapper , WrapTx } ;
pub use ui_commands ::UiCommand ;
@ -188,16 +187,13 @@ async fn start_neovim_runtime(
close_watcher_running . store ( false , Ordering ::Relaxed ) ;
} ) ;
if let Ok ( output ) = nvim . command_output ( "version" ) . await {
let re = Regex ::new ( r"NVIM v0.[4-9]\d*.\d+" ) . unwrap ( ) ;
if ! re . is_match ( & output ) {
match nvim . command_output ( "echo has('nvim-0.4')" ) . await . as_deref ( ) {
Ok ( "1" ) = > { } // This is just a guard
_ = > {
error ! ( "Neovide requires nvim version 0.4 or higher. Download the latest version here https://github.com/neovim/neovim/wiki/Installing-Neovim" ) ;
std ::process ::exit ( 0 ) ;
}
} else {
error ! ( "Neovide requires nvim version 0.4 or higher. Download the latest version here https://github.com/neovim/neovim/wiki/Installing-Neovim" ) ;
std ::process ::exit ( 0 ) ;
} ;
}
nvim . set_var ( "neovide" , Value ::Boolean ( true ) )
. await