Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Identify "active" region?
- X-seq: zsh-workers 24912
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Identify "active" region?
- Date: Sun, 04 May 2008 09:38:52 -0700
- In-reply-to: <237967ef0805040535y2f4343eds5b42adf9bc3075a6@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <080503175219.ZM11801@xxxxxxxxxxxxxxxxxxxxxx> <20080504132102.076669ed@pws-pc> <237967ef0805040533x699fcf37p2ea24d2abe38d3df@xxxxxxxxxxxxxx> <237967ef0805040535y2f4343eds5b42adf9bc3075a6@xxxxxxxxxxxxxx>
On May 4, 2:35pm, Mikael Magnusson wrote:
}
} I realize two things just after hitting send, 1) the variable should
} probably be called something like REGIONACTIVE, and 2) I didn't write
} any documentation for it.
Or it could be slightly more complicated and be an associative array
with fields active, start, and end. Then one could write
(( $REGION[active] )) && BUFFER[$REGION[start],$REGION[end]]=...
instead of
if (( $REGIONACTIVE ))
then
integer start=$MARK end=$CURSOR
if (( MARK > CURSOR ))
start=$CURSOR
end=$MARK
fi
BUFFER[$start,$end]=...
fi
However, $REGIONACTIVE is much better than nothing; thanks.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author