Author Topic: Multi line comment editing  (Read 4857 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Multi line comment editing
« on: April 25, 2015, 10:52:38 pm »
Attached patch modifies the action on press enter while editing a multi line comment.  If anyone has time to test, I would be interested if this behaviour feels useful, or just annoying.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Multi line comment editing
« Reply #1 on: April 26, 2015, 02:44:06 am »
Can you explain what it is supposed to change?
Post an example code?
I see no difference in behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Multi line comment editing
« Reply #2 on: April 26, 2015, 04:26:54 am »
Code: cpp
    /**
     * This is a comment.
     * Press enter here to see change:
Code: cpp
    // This is a comment.
    // Press enter here to see change:
Without this patch, the next line will copy the indentation only from the previous line.  With this patch, the leading * or // should also be copied.

Also:
Code: cpp
    /**
     * I am doxygen.
     *
     * @param foo
     * @param pressEnterHere
The pattern will copy "     * @param ".
« Last Edit: April 26, 2015, 04:29:49 am by Alpha »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Multi line comment editing
« Reply #3 on: April 26, 2015, 01:07:37 pm »
Are you sure you've tested it a lot and thoroughly? For me it works at random.
It is totally broken for non-doxygen comments (it copies random string either '/' or some random text).

Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Multi line comment editing
« Reply #4 on: April 28, 2015, 07:11:21 am »
Are you sure you've tested it a lot and thoroughly? For me it works at random.
Had it applied locally for a while, though it is my own code, so of course I am biased.

Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
Okay, thanks.  I was more looking for opinions on how it worked.  I will put this down on my checklist of things to improve planning of functionality for the future...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Multi line comment editing
« Reply #5 on: April 28, 2015, 08:34:20 am »
Had it applied locally for a while, though it is my own code, so of course I am biased.
What do you mean by biased?
The single line comments are totally broken.
I had it append just one '/' or even something like '// asdf' when I press enter.
I'm not sure I've seen it work correctly in the little testing I've done.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]