[code] [Textadept] Problem with URI_DROPPED

From: Giovanni Salmeri <g.salmeri.att.mondodomani.org>
Date: Sat, 25 Feb 2017 15:01:51 +0100

Hello everybody.

I am trying to accomplish a rather simple thing: when I drop a filename
in a document, I would like that the filename be added to the text. I
tried with the following code:

events.connect(events.URI_DROPPED, function(uri)
        buffer:add_text(uri)
        return true
end, 1)

... and it sort of works. The problem is that the filename is added, but
not where I drop it, but rather where the caret was before dropping
the filename. I cannot figure out a solution, and I suspect that this is
a limit of Scintilla. Any suggestions or ideas?

Thank you!

-- 
Giovanni Salmeri
http://mondodomani.org/pers/salmeri/
-- 
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 Sat 25 Feb 2017 - 09:01:51 EST

This archive was generated by hypermail 2.2.0 : Sun 26 Feb 2017 - 06:26:51 EST