New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompiler view jumps when toggling a breakpoint or adding a comment #2270
Comments
For some of them like renaming things re-running decompiler is unavoidable, but there is room for improvements to try better preserve view position. In case of breakpoints I don't think decompiler needs to be run. |
@karliss Yes, for breakpoints I think we can somehow stop the decompiler from running. In fact, that was the hack that I was thinking about. But ultimately, in order to fix this problem entirely, we have to find a way to reset the view position to exactly where it was before. In case this is not possible in the Can you explain a bit on how you think we can try to better preserve view position? |
Not performing an unnecessary decompilation isn't necessary a hack. It is somewhat expensive operation and performing it when not needed makes the UI less responsive. Even with position restoration working perfectly it would be preferable to do it only when necessary. As for scroll position preserving there two approaches I can think of two approaches that can be explored. Other approach is to try avoiding position reset. When doing basic text modifications cursor position is more or less preserved. Maybe the code can be replaced using text editing API in a way to reduces cursor move. |
@NirmalManoj Wasn't this fixed already? I guess gitthub automatically closes the issue only when PR gets merged to master. This can probably be closed. |
I'm closing it. |
Environment information
Describe the bug
Toggling a breakpoint(or adding a comment) in the decompiler widget causes the view to jump. This makes it difficult to keep track on the position of code you are looking at.
To Reproduce
See this GIF to see exactly what's happening
Expected behavior
The view should not move while adding toggling a breakpoint. But the highlighting of the line should change accordingly.
Findings so far (for the problem with toggling breakpoints)
After hours of debugging, I found that this view jumping problem happens because the whole code gets decompiled again when a new breakpoint is added. Then the code tries to reset the cursor to the previous location(the line at which the breakpoint was toggled). That's how we at least get to see the line at which the breakpoint was added. But the view doesn't get back to the way it was.
The text was updated successfully, but these errors were encountered: