issue/4599-Add cursor position information on the bottom of the editor area
End-user friendly description of the problem this fixes or functionality that this introduces
- [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below
Give a summary of what the PR does, explaining any non-trivial design decisions
This PR add information of where the cursor is inside the editor area. The information goes like:
Row: 4, Column: 15
Here's the implementation:
I've made this change by only modifying
frontend/src/routes/_oh.app._index/route.tsx
-
Added a variable cursorPosition to record the position of the cursor.
-
Dynamically change cursorPosition in handleEditorDidMount and pass it as a parameter to the sub-component code-editor-component.
frontend/src/components/features/editor/code-editor-component.tsx
-
Add the cursorPosition member variable to the component definition.
-
Add a div element to the return statement to display the cursorPosition information.
Link of any specific issues this addresses、 source issue issue#4599
This PR is renewable version of the previous PR 4626 which had been admitted by maintainers while there was some conflicts when some new changes were added into the project. I didn't work on those conflicts but made a new fork of the up-to-date project to devote my change. Hope this message can help you!
@amanape has this on his list to take a look.
Just need to take care of those linting errors and we're all set to merge
I've solved linting errors by adapting my code to a prettier style ~
@STF-Zero minor issue with this PR. The display actually overlays on top of the file. https://github.com/All-Hands-AI/OpenHands/issues/5438
I may revert this PR because the display makes the file a little hard to see. And I want to get a release out.
Sorry @STF-Zero we had to revert this, because of this https://github.com/All-Hands-AI/OpenHands/issues/5438
Happy to take it back in when it's fixed!
All right, I'll try to fix it soon~