[Geany-Users] Little questions

pauriem at gmail.com pauriem at xxxxx
Wed Sep 11 18:40:41 UTC 2013


thanks so much for this info

I will look at the source and maybe
I can contribute the patch you
outlined, but in the meantime if
I write the script to pass 0 with the
SCI_SETBACKSPACEUNINDENTS Scintilla message, would it be okay
to run this script on document open events, or would the hardwired code
override it for each document? or does the hardwired Scintilla message
re backspace behavior happen only once at program start-up?


On 9/8/13, Lex Trotman <elextr at gmail.com> wrote:
> On 9 September 2013 14:19, pauriem at gmail.com <pauriem at gmail.com> wrote:
>
>> I want to follow up on the part
>> of this old thread which is
>> complaining about the behavior
>> of the backspace in Scintilla, which
>> will sometimes trigger a forward
>> delete in an indentation context
>>
>
> It doesn't forward delete, it just removes one indentation level.
>
>
>
>>
>> I also find this really annoying and
>> pointless and would like to disable
>> it
>>
>
> There are times when it can be, yes, particularly in space indented code.
>
>
>>
>> from what I can gather, the
>> behavior is governed by a
>> property in Scintilla called
>> backspace-undeletes
>>
>
> IAW your next post backspaceunindents (no hyphen) yes.
>
>
>>
>> what I would hope to be able to do
>> is to use the plugin API to pass
>> a message to Scintilla to knock
>> off doing this
>>
>
> You can but, ... Geany also sets it when it sets the indent, which will
> overwrite anything you set.  It is hardcoded :( to set backspaceunindents
> for anything but tab indented files.
>
>
>>
>> is there such a message I can send,
>> or would I have to patch the geany
>> source to call a lower-level Scintilla
>> function not exposed through the
>> message-passing?
>>
>
> Just use the normal Scintilla messaging, see where Geany sets it
> editor.c:4540.  Given that this sets the backspaceunindents setting you
> will need to submit a well written patch to Geany that makes it depend on
> preferences.  Given that the current behaviour is indent type dependent,
> perhaps two prefs, current behaviour, or manual setting.
>
>
>>
>> failing that, I expect I can write a
>> script or macro that moves the
>> cursor one space left and then does
>> a forward delete (potentially in
>> a loop indexed by the indentation
>> value defined by the conf settings),
>>  and bind the backspace key to that?
>> is there any reason why that would
>> fail?
>>
>
> Why not just delete the character prior to the cursor?   That would be the
> expected backspace behaviour.
>
> Cheers
> Lex
>
>
>
>> _______________________________________________
>> Users mailing list
>> Users at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>
>


More information about the Users mailing list