beaver-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Beaver-devel] Bug: Last line of document


From: Tobias Heinzen
Subject: Re: [Beaver-devel] Bug: Last line of document
Date: Mon, 12 Jan 2009 17:33:42 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090102)

Double 12 wrote:
> I edited some Beaver source files in Beaver. If you edit files like
> src/api/api.h and src/api/beaver.h, that end like this:
>
> #endif /* __API_H */
>
> and if there's no newline or just one newline after it, the last */ is
> removed after saving.
> When you put two newlines after this line, the */ is preserved, but
> the two lines are removed.
>
> Weird bug, we first have to fix it, but then a new question comes to
> mind. Should Beaver automatically add a newline after a file that
> doesn't have one? Most editors do this.
So I now fixed this bug. The problem was that
gtk_text_buffer_get_char_count sometimes reports the wrong size. As it
is written on the documentation: "note that characters and bytes are not
the same, you can't e.g. expect the contents of the buffer in string
form to be this many bytes long." I'm using now 'strlen' to get the
size, but this is probably a little bit slower.

Greets
Tobias




reply via email to

[Prev in Thread] Current Thread [Next in Thread]