code-google-com / qdevelop

Automatically exported from code.google.com/p/qdevelop
GNU General Public License v2.0
1 stars 1 forks source link

Crash when commenting last line of file #315

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open some .cpp ( possibly other type too) file
2. Go to the last line and press CTRL+D ( toggle comment action )
3.

What is the expected output? What do you see instead?
The line should be (un)commented, but QDevelop seems to enter some infinite
loop and stops responding.

What version of the product are you using? On what operating system?
Tested with latest svn on Win XP

Original issue reported on code.google.com by to.oliveira@gmail.com on 21 Sep 2008 at 9:28

GoogleCodeExporter commented 9 years ago
This should do the trick.
textEdit::comment entered an infinite loop as it tried to position the cursor 
in 
the line *after* the last line to exit the loop which just can't hapen.
If the cursor move-to-next-blobk fails I assume that it hapens because there 
aren't 
more blocks so the loop terminates with a break. everything else works the same.

cheers,
--to

Original comment by to.oliveira@gmail.com on 23 Sep 2008 at 10:24

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in revision 359. Thank you.

Original comment by Lord.Div...@gmail.com on 30 Jan 2009 at 11:47