Behaviour SwRS-MDOKFSTUDIO-LIFE-186
The host tells a jump from a cursor move
When a text editor of an eligible Markdown file, or a side of a text diff whose real file is one, reports a selection change of kind Command with one selection that Studio did not expect, the host SHALL read it as a jump to the line of that selection in the real file, and SHALL never read a Keyboard, a Mouse or a no-kind change, or a change with several selections, as a jump.
Step 1 of path 2 in StRS-MDOKFSTUDIO-LIFE-023: from “A search result, a problem or a link takes a text editor to a line while the side preview follows the editor” to “The side preview places the line”.
Scenarios 2
The situations the tests check; open one to read it.
nominalA search click is a jump
Givena saved Markdown file open in a text editor
WhenVS Code reports a selection change of kind Command with one selection on line 40
Thenthe host fires a jump to line 40 of that file, once
boundaryMoves that are not jumps
| Input | Outcome |
|---|---|
| a Keyboard or a Mouse change, or a change with no kind | no jump |
| a Command change with several selections | no jump |
| a Command change Studio asked for ("Open as Text", a link followed in the side preview), within 1 second, once | no jump; the entry is used up |
| a Command change on the same line within 1 second of such a request | read as Studio's own: no jump (stated limit) |
| a file that is not an eligible Markdown file | no jump |
| a side of a text diff whose real file is eligible, whichever side holds the selection | a jump to that real file |
| a diff with no eligible real file | no jump |