You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with a Jupyter Notebook in Theia and using the vscode.window.activeTextEditor API to retrieve the editor.selection object, the selection data appears to be incorrect. This behavior differs from the expected results in VS Code.
Steps to Reproduce:
1. Open a Jupyter Notebook in Theia.
2. Select two lines of text within a single cell.
3. Log the editor.selection object:
Attaching a screenshot of the ipynb file (notice the two highlighted lines):
The selection object does not reflect the correct range and appears to always point to a single character, regardless of the actual selection.
Impact:
This inconsistency affects extensions or code relying on the editor.selection API for Jupyter notebooks, leading to incorrect behavior or functionality.
Additional Context:
This issue appears specific to Jupyter notebooks and does not occur with standard text files. It might be related to how Theia handles notebook-specific editors versus standard text editors.
Request:
Please investigate this discrepancy and align the behavior of editor.selection in Jupyter notebooks with the expected behavior in VS Code.
The text was updated successfully, but these errors were encountered:
Oh interesting. When selecting from top to bottom it works fine. But selecting bottom-top it just sets the cursor position. Are you encountering it the same way?
I'll see if i can fix it tommorrow
Description:
When working with a Jupyter Notebook in Theia and using the
vscode.window.activeTextEditor
API to retrieve the editor.selection object, the selection data appears to be incorrect. This behavior differs from the expected results in VS Code.Steps to Reproduce:
1. Open a Jupyter Notebook in Theia.
2. Select two lines of text within a single cell.
3. Log the editor.selection object:
Note - this only happens when selecting bottom to top
Expected Behavior (VS Code):
When selecting two lines in a cell, the editor.selection object accurately reflects the range, as shown below:
Observed Behavior (Theia):
For the same file and same selection, the editor.selection object is incorrect and outputs:
Attaching a screenshot of the ipynb file (notice the two highlighted lines):
![image](https://private-user-images.githubusercontent.com/21087316/387234055-e84838a8-ac7f-4054-b84a-a66666e737bd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NzgxMjksIm5iZiI6MTczOTQ3NzgyOSwicGF0aCI6Ii8yMTA4NzMxNi8zODcyMzQwNTUtZTg0ODM4YTgtYWM3Zi00MDU0LWI4NGEtYTY2NjY2ZTczN2JkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDIwMTcwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjZTMzNDA2NTg0MWE3NTYxMTc5ZmRjNjQ5ZGZhZGZjM2QxZDFiMGRkZGRkZWRjYzVkZTE4NjQwYjgxODkxZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AWPjb3hyWMz0OqALc0fkUjzALc7imcrLzBkZBPkhj-Q)
The selection object does not reflect the correct range and appears to always point to a single character, regardless of the actual selection.
Impact:
This inconsistency affects extensions or code relying on the editor.selection API for Jupyter notebooks, leading to incorrect behavior or functionality.
Additional Context:
This issue appears specific to Jupyter notebooks and does not occur with standard text files. It might be related to how Theia handles notebook-specific editors versus standard text editors.
Request:
Please investigate this discrepancy and align the behavior of editor.selection in Jupyter notebooks with the expected behavior in VS Code.
The text was updated successfully, but these errors were encountered: