Re: [code] Getting current selection start/end

From: DrTebi <>
Date: Mon, 20 Jun 2016 02:58:59 -0700

It has been a while since I customized my TextEdit, but I think this
should do the trick:

local l = buffer.selection_n_end[0] - buffer.selection_n_start[0]

On Sun, Jun 19, 2016 at 11:58 PM, Michael Richter <> wrote:
> Let's say I make a call to select_enclosed(left, right). How do I go about
> getting the start_pos and end_pos of the resulting selection? I just can't
> see it in the API, but I'm sure it's there.
> --
> "Perhaps people don't believe this, but throughout all of the discussions of
> entering China our focus has really been what's best for the Chinese people.
> It's not been about our revenue or profit or whatnot."
> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.

"The bitterness of poor quality remains long after the sweetness of
low price is forgotten."
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 20 Jun 2016 - 05:58:59 EDT

This archive was generated by hypermail 2.2.0 : Mon 20 Jun 2016 - 06:29:30 EDT