mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-12-23 05:54:51 +01:00
removed comments
This commit is contained in:
parent
ec8148cc0e
commit
1cbfc49df1
1 changed files with 0 additions and 28 deletions
|
@ -17,13 +17,6 @@ impl From::<Arc<codemp::cursor::Controller>> for JsCursorController {
|
|||
#[napi]
|
||||
impl JsCursorController {
|
||||
|
||||
|
||||
/*#[napi]
|
||||
pub fn call_threadsafe_recv(callback: JsFunction) -> Result<()>{
|
||||
let tsfn: ThreadsafeFunction<u32, ErrorStrategy::CalleeHandled> =
|
||||
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<codemp::proto::cursor::CursorEvent, ErrorStrategy::Fatal> =
|
||||
|
@ -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<JsCursorEvent> {
|
||||
// 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 {
|
||||
|
|
Loading…
Reference in a new issue