Re: [code] [textadept] Indenting after {Enter}

From: Qwerky <mr.qwerky.att.gmail.com>
Date: Mon, 26 Aug 2019 19:10:33 -0600

Hi Mitchell,

On 2019-08-25 07:32, Mitchell wrote:
> Hi,
>
> Sorry for the late reply, but I have a fix.
>
> On Thu, 22 Aug 2019, Procházka Lukáš Ing. wrote:
>
>> Hello all,
>>
>> Querky's reading my mind!
>>
>> On Wed, 21 Aug 2019 21:21:32 +0200, Qwerky <mr.qwerky.att.gmail.com> wrote:
>>
>>> Hi Lukas,
>>>
>>> On 2019-08-21 07:50, Procházka Lukáš Ing. wrote:
>>>> Hello,
>>>>
>>>> when I press {enter}, the cursor goes to the next line and
>>>> automatically indents - indentation is derived from indentation of the
>>>> text above.
>>>>
>>>> Is there a way to affect if (or how) the text is intended (filled by '
>>>> ') when cursor is moved to the next line after pressing {enter}?
>>>>
>>>> Best regards,
>>>>
>>>> Lukas
>>>>
>>>>
>>> Is this what you are looking for:
>>>
>>>
>>>      |textadept.editing.auto_indent| (bool)
>>
>> Yes, that's what I was looking for.
>>
>>> Match the previous line’s indentation level after inserting a new line.
>>> The default value is |true|.
>>>
>>> I would add to Lukas' question the following:
>>>
>>> Is there a way (or can a way be made) such that when the caret is at
>>> the
>>> end of a line when {enter} is pressed, the indentation follows the
>>> above
>>> setting, *but* when the caret is at the beginning of a line when
>>> {enter}
>>> is pressed, no indentation takes place?
>>
>> Yes, exactly - that should have be my following question, providing that
>> there was a way to control indenting after {enter} anyway!
>>
>>> It is very disconcerting when {enter} is pressed at the beginning of a
>>> line, and suddenly the current line jumps right to match indentation
>>> above it!
>>
>> Yes, my feelings are almost identical.
>
> I pushed a change[1] that should fix this.
>
> Cheers,
> Mitchell
>
> [1]: https://foicica.com/hg/textadept/rev/4b4d0d7a7b4b

Tested here, and seems to be working correctly.  This is a much-needed
fix.  Thank you.

qwerky

-- 
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 Mon 26 Aug 2019 - 21:10:33 EDT

This archive was generated by hypermail 2.2.0 : Tue 27 Aug 2019 - 06:40:12 EDT