Re: [code] [textadept] Modifying non-global buffer

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Sun, 22 Sep 2013 09:12:26 +0100

Mitchell,

On Sat, Sep 21, 2013 at 09:48:57PM -0400, Mitchell wrote:
> So now to answer your other question: if a non-global buffer is
> available in another split view, why doesn't `buffer:append_text()`
> work then? It's simple: I haven't written the code to do that :)

Ok, I think I understand better, but let me try to paraphrase (and make
inferences) to check my understanding:

* A Textadept "buffer" is a Scintilla "document".
* A Textadept "view" is a Scintilla widget
* Scintilla documents can be exchanged/shared between Scintilla widgets
(since you can switch buffers in different views)
* Textadept buffer methods are, under the hood, implemented using operations
on a Scintilla widget (not document)
* Currently, TA buffer methods will only work with the currently-focused view,
and this may or may not change in future.

Thanks for the explanations! That helps my general understanding of ta too.

Would you expect it to be possible to update another split view by doing a
(g)ui.goto_view before/after the buffer:append_text() in a Lua callback?
I've had a quick go which didn't quite seem to work, but I'm not sure if
I've got it quite right (and if the view's being refreshed when needed).

Regards,

Chris

-- 
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 22 Sep 2013 - 04:12:26 EDT

This archive was generated by hypermail 2.2.0 : Sun 22 Sep 2013 - 06:36:44 EDT