Re: how to enclose text

From: morchel <morc....at.hotmail.com>
Date: Mon, 31 May 2010 08:56:58 -0700 (PDT)

> function encloseIn()
> buffer:begin_undo_action()
> local start = buffer.selection_start
> local end = buffer.selection_end
> buffer:set_selection(end, end)
> buffer:add_selection(start, start)
> buffer:end_undo_action()
> end

Sorry Brian, I don't get it.

Finally you have two selections at the ends of the previous
selected text, which appear as two cursors? And then what?

Regards,
Martin
Received on Mon 31 May 2010 - 11:56:58 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:46:32 EST