[haiku-bugs] Re: [Haiku] #6510: terminal not handling color sequences properly

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 12 Sep 2010 20:26:04 -0000

#6510: terminal not handling color sequences properly
------------------------------------+---------------------------------------
  Reporter:  augiedoggie            |         Owner:  pulkomandy    
      Type:  bug                    |        Status:  assigned      
  Priority:  normal                 |     Milestone:  R1            
 Component:  Applications/Terminal  |       Version:  R1/Development
Resolution:                         |      Keywords:                
Blocked By:                         |   Has a Patch:  0             
  Platform:  All                    |      Blocking:                
------------------------------------+---------------------------------------

Comment (by pulkomandy):

 What happens is :
  * I changed the behaviour of termView to be more valid with regard to
 escape sequences. This means that every character position on screen must
 be tied to an attribute word. Unfortunately, this is not how the backend
 worked, it added attributes only to characters that had something
 "custom". This makes no sense, since the other chars still had an
 attribute word, but zeroed out.
  * What's left is handling chars that spans over multiple columns. This
 include tabulations (up to 8 columns), cursor move sequences (should fill
 the space they skip with the latest used color), and end of line. The end
 of line is the most tricky to handle. It goes as this : the last char
 attribute should be replicated, unless there was an ANSI attribute change
 in between, eg : set color to blue ; draw text ; newline > line is blue
 from the set color to the end, whereas set color to blue ; draw text ; set
 color to red ; newline > line is red from the second 'set color' to the
 end of the line. This second case is not handled as the newline is not
 stored as a character in the termView buffer. This also mix up the
 beginning of the following line in some cases because the start of a line
 tries to figure out the attribute from the last char in the previous line.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6510#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: