Is anyone else bothered by this?
Non-ambiguous cursor movement results in a lot of structural distinctions that have no visual impact on the output
Could you give an example?
When selecting an item to delete in a list, some selection boundary conditions don’t affect the output.
Thanks for clarifying. I’m still not sure I understand, though. What do you mean by selection boundary conditions? What are the “structural distinctions” that they result in?
Consider the following where the delete key acts (surprisingly) like cursor left.
Try positioning the cursor just after the focus box for everything. At that point, pressing the delete key repeatedly would do the same thing as pressing the cursor left key repeatedly.
It seems like the delete key doesn’t make changes to the underlying document structure like you would expect it to.
I don’t think I see the same behaviour. If I put the cursor after the nested itemize tags, then pressing delete does nothing. Backspace does the same as the Left key for me. The same is true for other environments, such as inline math.
I wouldn’t know what else to expect in such cases. If for example you were positioned after
<math|1+<frac|2|3>>, what should Backspace do? Delete the entire fraction? Delete 2? Or delete 3?
In the case of itemize it may be clearer what one could expect to happen, as there is more structure. One could argue that Backspace should act differently in that case, but you could also prefer consistency between different cases.
Since the document is not modified, the backspace key should not do anything.
Do I understand it correctly that you want Delete to change the document, but not Backspace?
I used Delete to refer to the backspace key earlier. So this is a discussion about the backspace key.
If pressing the backspace key in a particular context does not change the document, then it should also not move the cursor. Rather, in that scenario, the backspace key should do nothing.
Okay, I understand now, thanks for clarifying.
I quite like the behaviour as it is implemented currently. This way you can remove text mixed with tags by repeatedly pressing Backspace. In your proposal the cursor would stop once you reach the end of a different tag, right?
Maybe allow the current behavior for backspace but provide some sort of feedback to tell the user whether the document was changed as a result of pressing backspace?
That’s an interesting thought.
If the document is changed most of the time we already have visual clues, right? Either something changes in the layout of the document or the box indicating the active tag changes. A case where you may have little visual clues is when removing the inner of multiple empty environments.
Then there are cases when the document isn’t changed. Also for some of those there are visual clues. E.g. in the nested list example, the cyan box changes when you pres Backspace. Perhaps also in the case of empty tags there is are cases with little visual clues.
I don’t really know what a visual clue for such cases could look like though. If I’m in doubt, I consult the footer bar where you can see the active tags.
You could have the cursor turn pink if the last action did not modify the document and red if it did.