Alexander Burger <a...@software-lab.de> writes:

Hi Alex,

>> (for termux I always have to adapt the first line in /bin/vip,
>> i.e. replace /usr with termux $PREFIX, /data/data/com.termux/files/usr)
>
> This is no longer necessary if you install in Termux
>
>    $ apt install termux-exec
>
> With that, hashbangs like #!/usr/bin/pil automagically work! :)
> Most scripts now work on Linux and Termux without change.

I do have that installed, but the for the library on that first
line it does not work, I can leave the first (/usr/bin ...) as is, but have to 
change
the second entry (/usr/lib ...), otherwise I get a library-not-found error.

#!/usr/bin/picolisp /usr/lib/picolisp/lib.l

>> I looked into vip.l and some vt100 docs, but I find it really hard to
>> understand how e.g. "split window (qs)" is implemented with the vt100
>> escape sequences?
>> Could you elaborate on this a bit?
>
> The windows are maintained by Vip directly and explicitly. Simply positioning
> the cursor and writing stuff. Windows are just areas on the screen like
> everything else.
>
> As you see in @lib/vip.l, it uses only one single escape sequence for all such
> positionings:
>
>    (de cup (Y X)
>       (prin "^[[" Y ";" X "H") )
>
> The other escapes, like character attributes, line clearing, show/hide cursor
> and switching between first and second screen are more or less just cosmetics.

Ok, thanks, maybe I understand that somehow now. 

If you do a (horizontal) split, then 2 +Window objects refer
to the same +Buffer object, so changes are synchronized.
The split is realized by dividing the current window hight by 2,
adjust the existing +Window object, and create a new one. 
Vip itself than draws the separating status line for each window
(except the "mini buffer", in Emacs terminology).

So its really just PicoLisp drawing on one terminal screen, not much
vt100 "intelligence" involved. Thats cool ;-)

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to