equal
deleted
inserted
replaced
480 |
480 |
481 /* caret update: bidirectional */ |
481 /* caret update: bidirectional */ |
482 |
482 |
483 object Caret_Update |
483 object Caret_Update |
484 { |
484 { |
485 def apply(node_pos: Line.Node_Position): JSON.T = |
485 def apply(node_pos: Line.Node_Position, focus: Boolean): JSON.T = |
486 Notification("PIDE/caret_update", |
486 Notification("PIDE/caret_update", |
487 Map("uri" -> Url.print_file_name(node_pos.name), |
487 Map("uri" -> Url.print_file_name(node_pos.name), |
488 "line" -> node_pos.pos.line, |
488 "line" -> node_pos.pos.line, |
489 "character" -> node_pos.pos.column)) |
489 "character" -> node_pos.pos.column, |
490 |
490 "focus" -> focus)) |
491 def apply(file: JFile, pos: Line.Position): JSON.T = |
|
492 apply(Line.Node_Position(file.getPath, pos)) |
|
493 |
491 |
494 def unapply(json: JSON.T): Option[Option[(JFile, Line.Position)]] = |
492 def unapply(json: JSON.T): Option[Option[(JFile, Line.Position)]] = |
495 json match { |
493 json match { |
496 case Notification("PIDE/caret_update", Some(params)) => |
494 case Notification("PIDE/caret_update", Some(params)) => |
497 val caret = |
495 val caret = |