cutter icon indicating copy to clipboard operation
cutter copied to clipboard

Shortcut for "Rename" operates on wrong line / address.

Open Semnodime opened this issue 3 years ago • 3 comments

Environment information

  • Operating System: linuxmint 20.1
  • Cutter version: 1.12.0
  • File format: any
  • Arch: any
  • Type: any

Describe the bug Shortcut for "Rename" operates on wrong line / address after navigating via the goto bar.

To Reproduce Steps to reproduce the behavior:

  1. Select top most line of function in disassembly tab
  2. Rename via shortcut N
  3. Press g, type address of another function start, press Enter
  4. Press N to rename this function.
  5. Observe the dialog wrongly referencing the old address

Expected behavior Dialog for renaming the currently selected address.

Screenshots Notice how (after the goto via the navigation bar) the right address is selected, but the shortcut / dialog references the old address. image

Semnodime avatar Mar 10 '21 16:03 Semnodime

Does it happen with other keyboard shortcuts as well? e.g comment

ITAYC0HEN avatar Mar 15 '21 05:03 ITAYC0HEN

Guessing the mechanism of problem: a) disassembly context menu offset is not updated properly on specific navigation event -> should affect everything in disassembly context menu b) rename action does something when opening -> the problem should also affect it when triggering using shortcut after mouseclick

karliss avatar Mar 15 '21 07:03 karliss

Does it happen with other keyboard shortcuts as well? e.g comment

Nope, the problem does not apply to comments. A comment will get attached / edited for the correct line, while the rename still targets the last valid item.

Semnodime avatar Mar 15 '21 16:03 Semnodime