anchor.diff:               b))
         res)))
   
  +(defun vector-not-empty-p (v)
  +  (/= (length v) 0))
  +
   (defun complex-string-last-char-attributes (complex-string)
     "Returns the attributes of the last character of `complex-string' as three values:
   attributes, background color and foreground color"
  -  (flet ((vector-not-empty-p (v)
  -           (/= (length v) 0))
  -         (last-element (a)
  +  (flet ((last-element (a)
              (elt a (1- (length a)))))
       (with-accessors ((inner-array-a complex-char-array)) complex-string
         (let* ((last-complex-char    (and (vector-not-empty-p inner-array-a)
  
positive.code:                 last-char-bg
                  last-char-fg)))))
  
  
  (defun concat-complex-string-with-contagion (string-1 string-2)
    "Concatenate two  `complex-strings': the args `string-2' does not inherit
  
negative.code:                    b))
              res)))))
  
  (defmethod concat-complex-string ((a sequence) (b complex-string)
                                    &key (color-attributes-contagion t))
    "Return a  complex string  that is the  results of  concatenating of
  `a'    (a `string') and `b' (a `complex-string'). If
  `color-attributes-contagion' is non nil `a' will inherit all the attributes and
  color of the first element of `b'."
    (with-accessors ((inner-array-b complex-char-array)) b
      (multiple-value-bind (new-attributes new-bg new-fg)
          (complex-string-first-char-attributes b)
        (let* ((res-vector-length (+ (length a)
                                     (length inner-array-b)))
               (res               (make-instance 'complex-string
                                                 :complex-char-array
                                                 (make-array res-vector-length
                                                             :element-type 'complex-char
                                                             :fill-pointer res-vector-length
                                                             :adjustable      t
                                                             :initial-element
                                                             (make-instance 'complex-char)))))
          (with-accessors ((inner-array-res complex-char-array)) res
            (loop for i from 0 below (length a) do
                 (let ((new-complex-char (if (not color-attributes-contagion)
                                             (make-instance 'complex-char
                                                            :simple-char (elt a i))
                                             (make-instance 'complex-char
                                                            :bgcolor     new-bg
                                                            :fgcolor     new-fg
                                                            :attributes  new-attributes
                                                            :simple-char (elt a i)))))
                   (setf (elt inner-array-res i) new-complex-char)))
            (loop for i from 0 below (length inner-array-b) do
                 (setf (elt inner-array-res (+ i (length a))) (elt inner-array-b i)))
            res)))))
  
  (defmethod concat-complex-string ((a complex-string) (b complex-string)
                                    &key (color-attributes-contagion nil))
    "Return a complex string that is the results of concatenating of `a'
  