Hi all.
I have a bunch of little questions, some of them are not even related to Geany. Here they are:
1. There is a little issue with "Automatically continue block comments" turned on. It inserts comment symbols even if a block comment, which includes the beginning of the prev. line, is already closed. An example:
class A { virtual void a() = 0; }; class B { /* override */ void a() = {} * <<< comment symbol was inserted here
The attached patch checks whether the comment is still active before automatically continuing it. It seems to work fine for me.
2. There is a strange issue with deleting spaces from the beginning of a line. Suppose you have a file with indentation set to 2 spaces and two lines:
if foo: bar()
If you move cursor after the first space of the second line and press Backspace, you get
if foo: bar
with the cursor just before "bar", not in the beginning of the line. That is weird. Is this a "feature" of Scintilla or Geany? If the latter, which source file I need to fix? :-)
3. [unrelated] How do I reply to my own message in a mailing-list? (I tried to google it without success)
Best regards, Eugene.
Hi,
Eugene Arshinov a écrit :
- There is a strange issue with deleting spaces from the beginning of
a line. Suppose you have a file with indentation set to 2 spaces and two lines:
if foo: bar()
If you move cursor after the first space of the second line and press Backspace, you get
if foo: bar
with the cursor just before "bar", not in the beginning of the line. That is weird. Is this a "feature" of Scintilla or Geany? If the latter, which source file I need to fix? :-)
I this is truly a feature part of "remove indentation rather than character part of it", and I'm not sure it should be fixed at all. Perhaps it would be OK to delete the *character* the cursor is *inside* the indentation level and delete the indentation if at the end of an indentation level. [1]
- [unrelated] How do I reply to my own message in a mailing-list? (I
tried to google it without success)
hum… I don"t really got the point here: for me on a mailing list, the "messages" are simple e-mails: just respond to them as you might do with any other mail. your mail client should correctly send the message to the mailing list as the Reply-To: mail header says.
regards, Colomban
1. here with "character" I mean one of the character(s) that creates the indentation level; with "inside", I mean "not at a bound"; and with "indentation level" I mean the 2 spaces with a 2 space indentation: a line starting with 4 space have 2 level of indentation
On Tue, 23 Feb 2010 00:15:20 +0100% Colomban Wendling lists.ban@herbesfolles.org wrote:
Hi,
Eugene Arshinov a écrit :
- There is a strange issue with deleting spaces from the beginning
of a line. Suppose you have a file with indentation set to 2 spaces and two lines:
if foo: bar()
If you move cursor after the first space of the second line and press Backspace, you get
if foo: bar
with the cursor just before "bar", not in the beginning of the line. That is weird. Is this a "feature" of Scintilla or Geany? If the latter, which source file I need to fix? :-)
I this is truly a feature part of "remove indentation rather than character part of it", and I'm not sure it should be fixed at all. Perhaps it would be OK to delete the *character* the cursor is *inside* the indentation level and delete the indentation if at the end of an indentation level. [1]
- here with "character" I mean one of the character(s) that creates
the indentation level; with "inside", I mean "not at a bound"; and with "indentation level" I mean the 2 spaces with a 2 space indentation: a line starting with 4 space have 2 level of indentation
For me, the following behaviour seems more meaningful. If the cursor is inside the indentation level, delete this indentation level, so that new cursor position will be just before the indentation level or code to the right of the deleted indentation level. If the cursor is at a boundary, delete the indentation level to the left of the cursor.
Regards, Eugene.
Eugene Arshinov a écrit :
On Tue, 23 Feb 2010 00:15:20 +0100% Colomban Wendling lists.ban@herbesfolles.org wrote:
Hi,
Eugene Arshinov a écrit :
- There is a strange issue with deleting spaces from the beginning
of a line. Suppose you have a file with indentation set to 2 spaces and two lines:
if foo: bar()
If you move cursor after the first space of the second line and press Backspace, you get
if foo: bar
with the cursor just before "bar", not in the beginning of the line. That is weird. Is this a "feature" of Scintilla or Geany? If the latter, which source file I need to fix? :-)
I this is truly a feature part of "remove indentation rather than character part of it", and I'm not sure it should be fixed at all. Perhaps it would be OK to delete the *character* the cursor is *inside* the indentation level and delete the indentation if at the end of an indentation level. [1]
- here with "character" I mean one of the character(s) that creates
the indentation level; with "inside", I mean "not at a bound"; and with "indentation level" I mean the 2 spaces with a 2 space indentation: a line starting with 4 space have 2 level of indentation
For me, the following behaviour seems more meaningful. If the cursor is inside the indentation level, delete this indentation level, so that new cursor position will be just before the indentation level or code to the right of the deleted indentation level. If the cursor is at a boundary, delete the indentation level to the left of the cursor.
Regards, Eugene.
Oh, I misunderstood your point the first time. Why not. I think the current behavior is "reduce indentation of the current line", as done at other places; but I don't see any harm with your suggestion, quite the opposite, even if it is probably a little overkill IMO.
On Tue, 23 Feb 2010 00:52:07 +0100% Colomban Wendling lists.ban@herbesfolles.org wrote:
Eugene Arshinov a écrit :
On Tue, 23 Feb 2010 00:15:20 +0100% Colomban Wendling lists.ban@herbesfolles.org wrote:
Hi,
Eugene Arshinov a écrit :
- There is a strange issue with deleting spaces from the
beginning of a line. Suppose you have a file with indentation set to 2 spaces and two lines:
if foo: bar()
If you move cursor after the first space of the second line and press Backspace, you get
if foo: bar
with the cursor just before "bar", not in the beginning of the line. That is weird. Is this a "feature" of Scintilla or Geany? If the latter, which source file I need to fix? :-)
I this is truly a feature part of "remove indentation rather than character part of it", and I'm not sure it should be fixed at all. Perhaps it would be OK to delete the *character* the cursor is *inside* the indentation level and delete the indentation if at the end of an indentation level. [1]
- here with "character" I mean one of the character(s) that
creates the indentation level; with "inside", I mean "not at a bound"; and with "indentation level" I mean the 2 spaces with a 2 space indentation: a line starting with 4 space have 2 level of indentation
For me, the following behaviour seems more meaningful. If the cursor is inside the indentation level, delete this indentation level, so that new cursor position will be just before the indentation level or code to the right of the deleted indentation level. If the cursor is at a boundary, delete the indentation level to the left of the cursor.
Regards, Eugene.
Oh, I misunderstood your point the first time. Why not. I think the current behavior is "reduce indentation of the current line", as done at other places;
There is a separate «Format > Decrease indent» keybinding. I just assigned a shortcut for it and tested. The behaviour of this keybinding differs from the behaviour of Backspace, and it does exactly what I want: in the given example it moves the cursor to the beginning of the line. So, the behaviour of Backspace does not currently match the common one; it will match when fixed in a way I suggested.
but I don't see any harm with your suggestion, quite the opposite, even if it is probably a little overkill IMO.
I don't see an overkill here; the behaviour I suggested is rather easy to implement. Moreover, maybe it is possible to just reuse the code which handles «Decrease indent» keybinding in a case when Backspace is pressed within indentation (it seems that this case is already handled specially, so we wouldn't even need to write the code checking if the cursor is within indentation or not).
Best regards, Eugene.
On Tue, 23 Feb 2010 01:46:08 +0300% Eugene Arshinov earshinov@gmail.com wrote:
Hi all.
I have a bunch of little questions, some of them are not even related to Geany. Here they are:
<snip>
- [unrelated] How do I reply to my own message in a mailing-list? (I
tried to google it without success)
This is a test.
On Tue, 23 Feb 2010 00:26:38 +0100% Colomban Wendling lists.ban@herbesfolles.org wrote:
Eugene Arshinov a écrit :
This is a test.
That actually works!
Yeah, I got the point. I just pressed "Reply" and replaced the recipient address with geany-devel.
On Tue, 23 Feb 2010 01:46:08 +0300% Eugene Arshinov earshinov@gmail.com wrote:
- There is a little issue with "Automatically continue block
comments" turned on. It inserts comment symbols even if a block comment, which includes the beginning of the prev. line, is already closed. An example:
class A { virtual void a() = 0; }; class B { /* override */ void a() = {}
- <<< comment symbol was inserted here
The attached patch checks whether the comment is still active before automatically continuing it. It seems to work fine for me.
In this example class B should inherit A. I was in a hurry when writing this, so made a mistake. Though, the aim was to demonstrate what automatic continuing of comments does wrong, and this little issue with classes is not important at all.
On Tue, 23 Feb 2010 01:46:08 +0300, Eugene wrote:
Hi all.
I have a bunch of little questions, some of them are not even related to Geany. Here they are:
- There is a little issue with "Automatically continue block comments"
turned on. It inserts comment symbols even if a block comment, which includes the beginning of the prev. line, is already closed. An example:
class A { virtual void a() = 0; }; class B { /* override */ void a() = {}
- <<< comment symbol was inserted here
The attached patch checks whether the comment is still active before automatically continuing it. It seems to work fine for me.
Patch committed, many thanks for this one. This closed an open Debian bug report, yay.
Regards, Enrico
On Sun, 28 Feb 2010 16:05:10 +0100% Enrico Tröger enrico.troeger@uvena.de wrote:
On Tue, 23 Feb 2010 01:46:08 +0300, Eugene wrote:
Hi all.
I have a bunch of little questions, some of them are not even related to Geany. Here they are:
- There is a little issue with "Automatically continue block
comments" turned on. It inserts comment symbols even if a block comment, which includes the beginning of the prev. line, is already closed. An example:
class A { virtual void a() = 0; }; class B { /* override */ void a() = {}
- <<< comment symbol was inserted here
The attached patch checks whether the comment is still active before automatically continuing it. It seems to work fine for me.
Patch committed, many thanks for this one. This closed an open Debian bug report, yay.
Cool. I did not even know about the bug report :)
Best regards, Eugene.