bugBeaver - Bugs: bug #23522, Freezing syntax highlighting

 
 

bug #23522: Freezing syntax highlighting

Submitted by:  Double 12 <double12>
Submitted on:  Sun 08 Jun 2008 12:14:09 PM UTC  
 
Category: Syntax HighlightingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Double 12 <double12>Open/Closed: Closed
Release: NoneReproducibility: None
Size (loc): NonePlanned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 15 Jun 2008 08:27:56 PM UTC, comment #2:

I'm not too sure anymore, g_unichar_isspace caused an error.
Maybe g_unichar_ismark is a better choice.

Anonymous
Sun 15 Jun 2008 08:23:48 PM UTC, comment #1:

I probably fixed it!

The original part of code moves the iterator one position if the character is not a printable character:

while (!g_unichar_isprint (gtk_text_iter_get_char (start)))
{
gtk_text_iter_forward_cursor_position (start);
}

It caused freezing. Now I changed it to:

while (g_unichar_isspace (gtk_text_iter_get_char (start)))
{
gtk_text_iter_forward_cursor_position (start);
}

If the character is a space, tab or newline, the iterator is moved one position. This doesn't freeze.

Double 12 <double12>
Project MemberIn charge of this item.
Sun 08 Jun 2008 12:14:09 PM UTC, original submission:

I already mailed this to the mailinglist, but now I'll post it here too.

BEAVER 0.3.0 ONLY. Beaver 0.3.1 uses a different syntax highlighting system (GtkSourceView) and we are going to base future versions on 0.3.0 instead of 0.3.1.

When you choose a syntax highlighting language while the document is still empty, the program freezes. The program also freezes if you choose a syntax highlighting language and then add/remove a lot of text in the editor.

I found out this is caused in the function expand_syhi_iters in editor.c. The function is called when adding text, removing text or setting a highlighting language.
This part of code in the function causes the actual freezing:

while (!g_unichar_isprint (gtk_text_iter_get_char (start)))
{
gtk_text_iter_forward_cursor_position (start);
}

When I remove it, Beaver doesn't freeze anymore, but typing text in the editor goes pretty slow.
So, this code is needed, but it needs to be changed.

Double 12 <double12>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by aelthwin (Updated the item)
  • -unavailable- added by double12
  • -unavailable- added by double12 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Aug 2010 05:26:55 PM UTCaelthwinOpen/ClosedOpen=>Closed
    Sun 28 Dec 2008 11:25:53 AM UTCdouble12StatusReady For Test=>Fixed
    Sun 15 Jun 2008 08:23:48 PM UTCdouble12StatusNone=>Ready For Test
      Assigned toNone=>double12
    Sun 08 Jun 2008 12:15:08 PM UTCdouble12Carbon-Copy-=>Added teal

    Back to the top


    Powered by Savane 3.1-cleanup1