Re: [code] [textadept] Temporarily change caret policy while searching?

From: Mitchell <m.att.foicica.com>
Date: Sun, 7 Apr 2013 23:56:58 -0400 (EDT)

Hi Pete,

On Sun, 7 Apr 2013, Pete Kazmier wrote:

> Hi Mitchell,
>
> I've been playing around with the various caret policies in an effort to
> figure out how to get incremental searching to center the display when the
> next matched item is out of view. I can set it to 24 (EVEN | JUMPS), which
> works great while searching, but I prefer 13 (default in the term theme)
> for normal use.
>
> I was going to hack find.lua to change the policy before the view is
> scrolled and then reset it to what it's value was afterwards. The only
> problem is that I can't figure out how to get the current setting. Any
> ideas? Does this bother you too?

Try calling buffer:vertical_centre_caret() instead of fiddling with the
caret policy.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 07 Apr 2013 - 23:56:58 EDT

This archive was generated by hypermail 2.2.0 : Mon 08 Apr 2013 - 06:37:05 EDT