[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Cursor moves
- Subject: Re: Cursor moves
- From: "..." yesss@xxxxxxxx
- Date: Wed, 2 Sep 1998 20:19:47 -0400 (EDT)
My life got a little easier when I put together two
cursor movement func combinations that leave the cursor
in the original position while scrolling the screen:
73=MDLU
81=MULD
≪ In III+, [to PP precisely] the basic code is quite
similar [to the xyDos 4 macro], except that any existing
command line will be wiped out:
==
≫ --Carl Distefano
Whoops. As you probably will have realized before you
read this, Carl, the code shouldn't be that similar.
Shawn Harrison already discovered, and you may once
have explained to me, that WC is one of the funcs xyW3
xpl can't maintain. seb'ing the newline char does the job.
You may not know that the existing command line won't
be wiped out in xyW3 installations that use !xyWise,
a light overlay I wrote that transparently keeps
erased xyW3 CMline strings alive.
http://www.escape.com/~yesss/_xypro.html
≪ Assigning this code directly to a key is left
as an exercise for III+ mavens. ;-) ≫
Can't resist. ;) The !xyWise .kb3 sequence for your
pgm--call it, say, !PP--would read:
75=&C,!,p,p,&X
&C, !xyWise's .kb3 func BC replacement, profiles
the xystate at program launch and preserves the
xyWrite 3 lost 4, variables xyW3 forgets, which
when known let xpl work like a function. Thus
&C does for xyW3 what BX does for xyW4--but
unneurotically. &C isn't paired with a Q2
counterpart; &X simply inserts a run command
for any xpl whose name starts with a !bang, then
executes. In xpl, invoking the overlay's variable
{is110} restores the xyW3 lost 4 variables:
* at-launch CMline string
* at-launch CMline cursor position
* at-launch CMline/text cursor location
* at-launch insert/overstrike setting
For keyboard macros, &P calls {is110}.
In !PP, after invoking {is110} I'd want a GT
since, if the cursor was on the CMline at launch,
when {is110} moves the cursor to where it was in
the pre-!PP command, {is110} will leave it there.
And I'd want a GT for the first {cp}:
GT {sx01,{cp}}BC seb [o] XC NP {if{cp}=={pv01}}PP {ei}{lb
}BC {pv110}GT {ex} ^^^
(searchable xpl newline resembles linefeed [ascii 10])
Afield but possibly worth noting: !xyWise enables two
useful buffers: !xyWise option !OutBack captures and
on demand releases deleted or backspaced characters
one by one, and !xyWise itself keeps a command archive
that you can rotate to retrieve previous commands
(even places the cursor where it was in each when
the command was cached). Manage and edit both buffers
with everyday xyW tools. !xyWiz is a bundled xpl
collection of xyW3 interface essentials: Three
streamline file and session management, searches
and replaces, and text blocks. The rest are sundry
utilities that handle spell checks and such. ... Ciao. --a
======================================== adpFisher nyc
http://www.escape.com/%7Eyesss/ =======================================