Opened 17 years ago
Last modified 11 years ago
#158 accepted enhancement
cursor positioning is wrong when sending commands
Reported by: | alex heneveld | Owned by: | Graham Dutton |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | 1:pg-eclipse | Keywords: | |
Cc: |
Description (last modified by )
the GotoAction
will move the cursor to near the end of the previous command.
that's annoying, if i'm using the GotoAction
then presumably i'm happy with where the cursor is
(typically i'm writing a line of a proof, and i want PG to prove everything up to it.)
next and undo also move the cursor position -- which sometimes i like and sometimes i don't. not a bug in itself but worth considering what desired behaviour should be whilst fixing the bugs above and below.
there are also some obvious off-by-one errors when setting cursor position, it ends up before the last processed char, rather than after it.
and there are some curious races in setting the cursor position -- sometimes it gets moved and sometimes it doesn't.
CURRENT STATUS: Working correctly if marker-based offset processing is enabled in PG Preferences.
Change History (7)
comment:1 Changed 17 years ago by
Priority: | major → critical |
---|
comment:2 Changed 16 years ago by
Owner: | changed from David Aspinall to Graham Dutton |
---|
comment:3 Changed 16 years ago by
Priority: | critical → major |
---|
comment:4 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Status: | new → accepted |
comment:5 Changed 16 years ago by
Priority: | major → minor |
---|---|
Type: | defect → enhancement |
Great! No longer using the old partition-change offset broadcasts proves that the corsor handling is at least sane.
I'll check that the duplicate methods for setting the caret/selection are still relevant, and that the storing/restoring of the position is even necessary.
Downgrading to minor/enhancement in the meantime.
comment:6 Changed 16 years ago by
Description: | modified (diff) |
---|
We should fix the position errors at least for 1.0.6: these are probably being set from the wrong offsets. Forwards and backwards should move the cursor but goto not (good suggestion).
In general, the usability heuristic is hard to get right here: there are many settings possible in Emacs PG to allow users to get the behaviour they want, but it is overly complicated.
Perhaps (for 1.0.7): as the user has started typing in the document (even moving the cursor keys), we should set a flag in the document to say that the cursor should not be moved by the script management code. Clicking on the activate button always moves the cursor to the end of the locked region anyway, so the user can use that.