Hi
Would it be feasible to have an option, perhaps under Tools / Options / General / General Settings, that makes the cursor "hug end of line" when you navigate from a line to another shorter line (similar to Ed)?
When the "hug end of line" option was unchecked, Zeus' behaviour would remain unchanged.
When the "hug end of line" option was checked, Zeus would move the cursor to the end of any line that you navigate to, if that line was shorter than the line that you navigated from, ie. it would not allow the cursor to remain in "whitespace" beyond the end of line, unless you explicitly placed it there with the mouse or the keyboard (eg. right-arrow).
For example, in the following text, if the cursor was resting at the beginning of line 0001 and you pressed the End key to move it to end of line, it would be resting in column 26.
If you then navigated down one line, the cursor would move to column 1 on line 0002. Navigate down one line again and the cursor would move to column 15 (end of line) on line 0003. Navigate down twice more and the cursor would move to column 26 on line 0005. The reason the cursor would move to column 26 (the first "." in ".F.") on line 0005 and not column 29 (end of line) is that the cursor is only moved to EOL if not doing so would cause it to rest in the whitespace beyond EOL.
0001: function Session ( xSet )
0002:
0003: local xRet
0004:
0005: default sxSession to .F.
0006:
0007: xRet := sxSession
0008:
0009: if ! IsNil(xSet)
0010: sxSession := xSet
0011:
0012: endif
0013:
0014: return ( xRet )
Regards
Richard
Cursor hug end of line
Hi Richard,
I think this is already possible
You need to use the Options, Editor Options menu and turn on the Mouse down puts cursor at EOL option found in the General Panel.
Next, use the Options Editor Options menu and in the Keyboard Mapping panel remap the line up and line down keyboard events to and replace the current functions:
to use these functions instead:
Finally, remap the left and right arrow keyboard events to use these functions:
Cheers Jussi
Would it be feasible to have an option, perhaps under Tools / Options / General / General Settings, that makes the cursor "hug end of line" when you navigate from a line to another shorter line (similar to Ed)?
I think this is already possible

You need to use the Options, Editor Options menu and turn on the Mouse down puts cursor at EOL option found in the General Panel.
Next, use the Options Editor Options menu and in the Keyboard Mapping panel remap the line up and line down keyboard events to and replace the current functions:
Code: Select all
MoveLineUp
MoveLineDown
Code: Select all
MoveLineUpEx
MoveLineDownEx
Code: Select all
MoveLineLeftEx
MoveLineRightEx
Last edited by jussij on Thu Jan 28, 2010 10:53 pm, edited 1 time in total.