diff --git a/src/nvim.rs b/src/nvim.rs index b7c1c55..fb35fa7 100644 --- a/src/nvim.rs +++ b/src/nvim.rs @@ -148,6 +148,7 @@ impl Nvim { nvim.ui_detach()?; let id = nvim.request("nvim_get_option", ("termguicolors",))?; + let _gg = nvim.press_shift_gg(); nvim.termguicolors = nvim.wait_for_response(id)?.as_bool().expect("expected a bool"); // get synattr of Normal @@ -199,6 +200,11 @@ impl Nvim { Ok(()) } + pub fn press_shift_gg(&mut self) -> NvimResult<()> { + self.request("vim_input", ("GG",))?; + Ok(()) + } + pub fn nvim_command(&mut self, command: &str) -> NvimResult<()> { let id = self.request("nvim_command", (command,))?; self.wait_for_response(id)?;