edb-debugger icon indicating copy to clipboard operation
edb-debugger copied to clipboard

Can't use backspace in some cases in Edit Binary String dialog

Open 10110111 opened this issue 10 years ago • 1 comments

To reproduce:

  1. Select some multibyte instruction in disassembly view
  2. Put cursor in Hex field right before e.g. second byte (i.e. after separating space)
  3. Press backspace
  4. See nothing worked

This naturally occurs when you e.g. delete bytes in the middle of the string instead of the end.

Interestingly, if I do the opposite — i.e. press Delete when the cursor is before space, the cursor is moved forward. Although it doesn't actually delete anything, I can at least press Delete once again and get the char deleted.

Ideally, the spaces there should be nothing more than spacers, i.e. something invisible to keyboard navigation & editing process. Namely, pressing Delete before space should place the cursor after that space and delete char forward, and pressing Backspace after space should place the cursor before that space and delete the char backward.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

10110111 avatar Jan 05 '16 08:01 10110111

Yea, I remember these from when I first implemented this dialog. It proved to be very tricky to get right with Qt validators. I think the only way to get the "perfect" behavior is essentially do as you suggest and have the widget separate data from presentation. Internally, it should just know about hex digits, but then when it displays, at that point it would choose to display the spaces strictly as visual spacers.

eteran avatar Feb 22 '16 07:02 eteran