@@ -9,7 +9,7 @@ service Cursor {
9
9
// Retrieves all current cursor positions.
10
10
rpc List (common .Empty ) returns (CursorEventList );
11
11
// Subscribe to a workspace's cursor events.
12
- rpc Attach (stream cursor . CursorPosition ) returns (stream cursor . CursorEvent );
12
+ rpc Attach (stream CursorUpdate ) returns (stream CursorEvent );
13
13
}
14
14
15
15
// A message representing a list of cursor events.
@@ -26,20 +26,26 @@ message RowCol {
26
26
required int32 col = 2 ;
27
27
}
28
28
29
- // A message representing cursor position.
29
+ // A message representing a cursor position.
30
30
message CursorPosition {
31
- // The buffer where the cursor is located.
32
- required files.BufferNode buffer = 1 ;
33
31
// The cursor's start position.
34
- required RowCol start = 2 ;
32
+ required RowCol start = 1 ;
35
33
// The cursor's end position.
36
- required RowCol end = 3 ;
34
+ required RowCol end = 2 ;
35
+ }
36
+
37
+ // A message representing an update to the cursor position.
38
+ message CursorUpdate {
39
+ // The buffer where the cursor is located.
40
+ required files.BufferNode buffer = 1 ;
41
+ // A vector of cursor positions.
42
+ repeated CursorPosition = 2 ;
37
43
}
38
44
39
45
// A message representing a cursor event.
40
46
message CursorEvent {
41
47
// The user moving the cursor.
42
48
required common.Identifier user = 1 ;
43
49
// The new cursor position.
44
- repeated CursorPosition position = 2 ;
50
+ repeated CursorUpdate position = 2 ;
45
51
}
0 commit comments