diff --git a/src/rust/cursor.rs b/src/rust/cursor.rs index 76eb1e2..d311a80 100644 --- a/src/rust/cursor.rs +++ b/src/rust/cursor.rs @@ -17,13 +17,6 @@ impl From::> for JsCursorController { #[napi] impl JsCursorController { - - /*#[napi] - pub fn call_threadsafe_recv(callback: JsFunction) -> Result<()>{ - let tsfn: ThreadsafeFunction = - callback.create_threadsafe_function(0, |ctx| Ok(vec![ctx.value + 1]))?; - }*/ - #[napi(ts_args_type = "fun: (event: JsCursorEvent) => void")] pub fn callback(&self, fun: napi::JsFunction) -> napi::Result<()>{ let tsfn : ThreadsafeFunction = @@ -47,27 +40,6 @@ impl JsCursorController { Ok(()) } - - // let controller = codemp.join('default').await - // // TODO register cursor callback, when cursormoved call { controller.send(event) } - // controller.callback( (ev) => { - // editor.change(event.tex) - // }); - - - - - - - // #[napi] - // pub async fn recv(&self) -> napi::Result { - // Ok( - // self.0.recv().await - // .map_err(|e| napi::Error::from(JsCodempError(e)))? - // .into() - // ) - // } - #[napi] pub fn send(&self, buffer: String, start: (i32, i32), end: (i32, i32)) -> napi::Result<()> { let pos = codemp::proto::cursor::CursorPosition {