Open MRYingLEE opened 2 weeks ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Command currentLineWrap is always disabled while currentLineNumbers works well.
These 2 commands should have the same code structure. So I checked the source code and found unexpected difference.
In the currentLineWrap,(https://github.com/jupyterlab/jupyterlab/blob/52442fbc4c52e1e86544cd4ad714272f9de71e40/packages/fileeditor-extension/src/commands.ts#L371)
isToggled: () => { const widget = tracker.currentWidget; return ( (widget?.content.editor.getOption('lineWrap') as boolean) ?? false ); }
While in the currentLineNumbers, (https://github.com/jupyterlab/jupyterlab/blob/52442fbc4c52e1e86544cd4ad714272f9de71e40/packages/fileeditor-extension/src/commands.ts#L326-L329)
isToggled: () => { const widget = tracker.currentWidget; return ( (widget?.content.editor.getOption('lineNumbers') as | boolean | undefined) ?? false ); }
I believe there is a bug in the code of currentLineWrap, which should follow the way of currentLineNumbers.
Please give a quick fix. Thanks,