Author Topic: Comment wrap length not working for me  (Read 5610 times)

HabeusCorpse

  • Community Member
  • Posts: 14
  • Hero Points: 1
Comment wrap length not working for me
« on: January 21, 2007, 02:10:28 am »
No matter what what option I choose for Comment Wrap -> Comment width, comments generated via Document -> Comment Block are only as long as the text being commented. They should be 80 characters long, according to the COmment width settings I have. Also wrapping occurs at the short length, not at 80.

eg.

Foo

I select this line and apply Comment Block. I get

/*----
 Foo
----*/

If I type in the comment block, it wraps like so:

/*----
 Foo
 Hello
 world
----*/

What I'm expecting is something like:

/*--------------------------------------------------------------------------
Foo
--------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------
Foo Hello world
--------------------------------------------------------------------------*/

This happens despite my sleecting Fixed with 80 columns, or Fixed width 80 columns maximum column 80, or Fixed right margin 80.

Also Reflow comment doesn't fix it.

I'm using Brief emulation editing c/c++ files.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Comment wrap length not working for me
« Reply #1 on: January 22, 2007, 03:13:41 pm »
I can't duplicate this problem. I think there's a couple things going on here.

1) Comment Block does not take into account your settings for comment wrapping. It looks at the length of the lines in the selection and draws the borders based on the current line length. I guess we should add an option to this to draw the same number of characters as specified in Commend Wrap.

2) Reflow comments does not redraw the borders. It will wrap them if they are longer than the specified width, but it will not add or remove border characters on top or bottom.

3) Select Document > Comment Setup, then pick the Comment Wrap tab. Do you have a check in the "Preserve width on existing comments" checkbox? I suspect you do, which would cause all subsequent lines to wrap at the length of the foo line. If so, you should turn that off. If not, please post your comment wrap settings, a screen show will do nicely.

HabeusCorpse

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Comment wrap length not working for me
« Reply #2 on: January 27, 2007, 05:45:17 pm »
1) and 2) I understand, though I think it would be convenient for the block comment to honor the word wrap settings. OTOH, I haven't looked at all use cases for that behavior. My main issue is that once a block comment is done, the word-wrapping on lines contained in the comment adhere to the length of the comment, and not to the word-wrap settings (at least for me.) So when I append to the original comment, I get word wrap at column 10, if the original comment was 10 characters long, rather than at column 80. I have "Preserve width on existing comments" NOT checked.

My word wrap settings are:

X Enable comment wrap
X Enable blcok comment wrap
X Fixed Width - 80
X Maximum right column - 80

Everything else is unchecked. I've also tried all other reasonable settings.

I have a similar weird problem on another computer where my searches started wrapping around, even though my setting is not to wrap, and always has been. I'm using v11.2 on both PCs. I reinstalled on the PC having the comment block issue, but it didn't help. I did keep my old settings through the reinstall however.

Thanks

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Comment wrap length not working for me
« Reply #3 on: January 29, 2007, 04:00:46 pm »
Yup, no problem replicating this problem now. I've filed a defect and we hope to have this fixed for v12. Thanks for bringing this up.

--Sott