[Geany] toggle comment skips some lines.

Enrico Tröger enrico.troeger at xxxxx
Sat Oct 2 14:22:15 UTC 2010


On Mon, 27 Sep 2010 08:48:45 +0200, Joerg wrote:

>On Sun, 26 Sep 2010 20:05:23 +0200
>Enrico Tröger <enrico.troeger at uvena.de> wrote:
>
>> Anyway, the fix seems to be quite easy: we read the lines to be
>> commented/uncommented and remove the last character ('\n' usually)
>> but we didn't care about CRLF. So the '\r' kept in the buffer
>> holding the line and that confused the other code.
>
>Do you mean that you change the document? Or do you change the
>"internal representation", so that the file on disk isn't changed?

Er, sorry for not being clear.
The change I did was only internal in Geany. When we toggle line
commentation, each line is read into a new buffer and analysed before
performing any changes. And for this internal buffer, I made the
changes. So the file itself is not touched at all.


>What I want to ask is, does the file after storing has still CRLF line
>endings?

Sure.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20101002/dbcf9e87/attachment.pgp>


More information about the Users mailing list