Migrate to new neovim-lib version.
update dependencies versions, fix some new problems due to version update
This commit is contained in:
12
src/input.rs
12
src/input.rs
@@ -7,7 +7,8 @@ include!(concat!(env!("OUT_DIR"), "/key_map_table.rs"));
|
||||
|
||||
|
||||
pub fn keyval_to_input_string(val: &str, state: gdk::ModifierType) -> String {
|
||||
let mut input = String::from("<");
|
||||
let mut input = String::new();
|
||||
|
||||
if state.contains(gdk::SHIFT_MASK) {
|
||||
input.push_str("S-");
|
||||
}
|
||||
@@ -17,9 +18,14 @@ pub fn keyval_to_input_string(val: &str, state: gdk::ModifierType) -> String {
|
||||
if state.contains(gdk::MOD1_MASK) {
|
||||
input.push_str("A-");
|
||||
}
|
||||
|
||||
input.push_str(val);
|
||||
input.push_str(">");
|
||||
input
|
||||
|
||||
if input.len() > 1 {
|
||||
format!("<{}>", input)
|
||||
} else {
|
||||
input
|
||||
}
|
||||
}
|
||||
|
||||
pub fn convert_key(ev: &EventKey) -> Option<String> {
|
||||
|
||||
@@ -5,7 +5,6 @@ extern crate glib;
|
||||
extern crate glib_sys;
|
||||
extern crate cairo;
|
||||
extern crate neovim_lib;
|
||||
extern crate rmp;
|
||||
extern crate phf;
|
||||
|
||||
mod nvim;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
use neovim_lib::{Neovim, NeovimApi, Session};
|
||||
use neovim_lib::{Neovim, NeovimApi, Session, Value, Integer};
|
||||
use std::io::{Result, Error, ErrorKind};
|
||||
use std::result;
|
||||
use std::collections::HashMap;
|
||||
use ui_model::UiModel;
|
||||
use rmp::Value;
|
||||
use rmp::value::Integer;
|
||||
use ui;
|
||||
use ui::Ui;
|
||||
use glib;
|
||||
|
||||
@@ -3,9 +3,6 @@ use std::thread;
|
||||
use std::collections::HashMap;
|
||||
use std::string::String;
|
||||
|
||||
use rmp::Value;
|
||||
use rmp::value::Integer;
|
||||
|
||||
use cairo;
|
||||
use cairo::TextExtents;
|
||||
use cairo::enums::{FontWeight, FontSlant};
|
||||
@@ -16,7 +13,7 @@ use gdk::{ModifierType, Event, EventKey, EventConfigure, EventButton, EventMotio
|
||||
use gdk_sys;
|
||||
use glib;
|
||||
use glib_sys;
|
||||
use neovim_lib::{Neovim, NeovimApi};
|
||||
use neovim_lib::{Neovim, NeovimApi, Value, Integer};
|
||||
|
||||
use ui_model::{UiModel, Attrs, Color, COLOR_BLACK, COLOR_WHITE};
|
||||
use nvim::RedrawEvents;
|
||||
@@ -32,7 +29,7 @@ const FONT_SIZE: f64 = 16.0;
|
||||
thread_local!(pub static UI: RefCell<Ui> = {
|
||||
let thread = thread::current();
|
||||
let current_thread_name = thread.name();
|
||||
if current_thread_name != Some("<main>") {
|
||||
if current_thread_name != Some("main") {
|
||||
panic!("Can create UI only from main thread, {:?}", current_thread_name);
|
||||
}
|
||||
RefCell::new(Ui::new())
|
||||
|
||||
Reference in New Issue
Block a user