[Geany-Users] Little questions
Lex Trotman
elextr at xxxxx
Mon Sep 9 05:01:08 UTC 2013
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20130909/af924482/attachment.html>
More information about the Users
mailing list