Re: GTK+ performance problem



On 15/09/06, mikecorn <mikecorn t-online de> wrote:

 By redundant marks, I meant multiple marks at the same place, with the same
name (or no name), and the same gravity.

 How about changing the create mark function to return the existing mark if
the created mark would be the same?

A mark can be moved with gtk_text_buffer_move_mark(), so just because
two marks are at the same position in the text at one instant doesn't
mean they'll be at the same position later.

For example, there is a mark called "insert" that represents the
cursor where text the user types will be inserted.  When the cursor
position changes, so does the position of the mark.

If two bits of unrelated code were handed the same mark by
create_mark() and one piece of code moved the mark, you'd run into
weird bugs.

James.



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