Re: [code] Feature request: snippet._insert should allow replacing the selection

From: Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
Date: Fri, 7 Apr 2017 11:59:07 +0200

In my limited understanding, the main problem is that the code currently
doesn't distinguish between snippet triggered with the '\t' key and snippet
triggered from the menu or from calling textadept.snippets._insert() in
some Lua code. My main limitation is that I'm not proficient enough in Lua
to understand the implementation and propose fixes... still learning...

BR, /PA

On 4 April 2017 at 22:12, Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
wrote:

> Hi Mitchell, nothing to be sorry about and happy to help testing ;-)
> Textadept is so great!
>
> /PA
>
> El 4 abr. 2017 19:24, "Mitchell" <m.att.foicica.com> escribió:
>
>> Hi Pedro,
>>
>> On Sun, 2 Apr 2017, Pedro Andres Aranda Gutierrez wrote:
>>
>> Hi Mitchell
>>>
>>> lots of confusion with the snippets and %<selected_text>. I think have
>>> figured out what puzzles me (see attached screenshot to follow).
>>>
>>> So left is the ini.file right is a text file. Lines 1, 2, 3 and 10 are
>>> what
>>> happens if I apply any of the snippets to a line that is completely
>>> selected: selected text is kept and result of snippet is appended at end
>>> of line. This behaviour is unexpected and cause of my woes.
>>>
>>> Lines 4,5,6 and 7 are the correct behaviour of the first snippet and that
>>> only happens when we select a line partially (a word, or a couple of
>>> words
>>> from a line.
>>>
>>
>> Sorry for the trouble :( I have confirmed the bug and will commit a fix
>> when I have some time.
>>
>> 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.
>>
>>

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellet zu werden
Georg Kreisler
-- 
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 Fri 07 Apr 2017 - 05:59:07 EDT

This archive was generated by hypermail 2.2.0 : Fri 07 Apr 2017 - 06:54:33 EDT