Author Topic: A bug? In Fortran mode, 'comment editing' doesn't work  (Read 4810 times)

fukandahai

  • Community Member
  • Posts: 9
  • Hero Points: 1
A bug? In Fortran mode, 'comment editing' doesn't work
« on: March 28, 2010, 07:42:15 AM »
v14.0.2.2
In Fortran mode, 'comment editing' doesn't work. Please check it.
For example, when Enter is pressed in the middle of a line comment, the new line does not be started with the comment symbol.
« Last Edit: March 30, 2010, 05:36:59 AM by fukandahai »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: A bug? In Fortran mode, 'comment editing' doesn't work
« Reply #1 on: March 28, 2010, 05:37:22 PM »
Is the "Extend line comments" setting turned on?  It is off by default.

The Help describes how it works:

Quote
Extend line comments - If selected, when you press Enter at the end of a line containing a line comment, and there is also an aligned line comment on the line before or after the current line, a new line comment will automatically be started on the new line. For example:

// The quick brown fox
// jumped over the lazy dog.[CURSOR_HERE]
Pressing Enter will result in:

// The quick brown fox
// jumped over the lazy dog.
// [CURSOR_HERE]

If that doesn't help, can you give detailed steps for how to reproduce the problem?

fukandahai

  • Community Member
  • Posts: 9
  • Hero Points: 1
Re: A bug? In Fortran mode, 'comment editing' doesn't work
« Reply #2 on: March 30, 2010, 05:44:42 AM »
I know the behavior of "Extend line comments" and it doesn't work too. Here I mean the "Split line comments".

For example,
1. Make a new fortran file
2. Make sure that the settings of "Split line comments" is turned on
3. Test the behavior

C The quick brown fox [CURSOR_HERE]jumped over the lazy dog.

Pressing Enter will result in:

C The quick brown fox
[CURSOR_HERE]jumped over the lazy dog.

The same tests are OK in C++ mode.
« Last Edit: March 30, 2010, 05:49:30 AM by fukandahai »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: A bug? In Fortran mode, 'comment editing' doesn't work
« Reply #3 on: March 30, 2010, 06:28:19 AM »
I can reproduce the issue as well:

I get the same behavior when creating a new file using the Fortran document mode.
"C hello" colors the line as a comment, but pressing Enter at the end does not start the new line with the "C " comment prefix.
I noticed that "!" is the default line comment character for Fortran mode, so I tried that as well:
"! hello" colors the line as a comment, but pressing Enter at the end does not start the new line with the "! " comment prefix.
Nor does "! " followed by Enter.

fukandahai

  • Community Member
  • Posts: 9
  • Hero Points: 1
Re: A bug? In Fortran mode, 'comment editing' doesn't work
« Reply #4 on: March 30, 2010, 06:37:52 AM »
Thanks for your test.

MHP

  • Community Member
  • Posts: 10
  • Hero Points: 0
Re: A bug? In Fortran mode, 'comment editing' doesn't work
« Reply #5 on: April 04, 2010, 03:57:24 AM »
It doesn't work for me, either, with version 14.0.2.2. on Windows.

Mike