Thanks for the information.

I was investigating the issue a little more and found out the the problems is
that I have the option "Scroll past EOL and EOF" set to true. If I don't use
this option commands ecLeft, ecSelLeft, ecRight, ecSelRight work correctly. But
with the option set, commands ecLeft, ecSelLeft do not work at the beginning of
the line.

I patched the code a little to make this function properly:

In function _ueCL()_ replace lines:
  if (curx == 1) {
    ed.command("ecLeft");

with 
  if (curx == 1) {
    if (cury > 1) {
      ed.command("ecUp");
      ed.command("ecLineEnd");
    }
  } else if (curx > line.length+1) {
    ed.command("ecLineEnd");


In function _ueCSL()_  replace lines:
  if (curx == 1) {
    ed.command("ecSelLeft");

with 
  if (curx == 1) {
    if (cury > 1) {
      ed.command("ecSelUp");
      ed.command("ecSelLineEnd");
    }
  } else if (curx > line.length+1) {
    ed.command("ecSelLineEnd");


In function _ueCSR()_  replace lines:
  if (curx >= line.length) {
    ed.command("ecSelRight");

with 
  if (curx >= line.length) {
    ed.command("ecSelDown");
    ed.command("ecSelLineStart");


This works with "Scroll past EOL and EOF" and without.

If you would like to have my full updated code of this script you can find it
here:
ingkcpos.zip (viz http://www.drizbach.com/data/pspad/ingkcpos.zip )

Regards,
Petr

-- 
<http://forum.pspad.com/read.php?4,43527,43549>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem