def push_last_word lineno=@current_index
       _maxlen = @maxlen || @width - @internal_width
      #lastspace = @buffer.rindex(" ")
      #lastspace = @list[lineno].rindex(/ \w/)
      line = @list[lineno]
      line = @list[lineno][0.._maxlen+1] if line.length > _maxlen
      lastspace = line.rindex(/ \w/)
      $log.debug " PUSH:2 #{lastspace},#{line},"
      # fix to ensure something returned 2010-09-07 22:40 
      lastspace = _maxlen-1 unless lastspace # added 2010-09-07 22:29  XXXX

      if !lastspace.nil?
        lastchars = @list[lineno][lastspace+1..-1]
        @list[lineno] = @list[lineno][0..lastspace]
        $log.debug "PUSH_LAST:ls:#{lastspace},lw:#{lastchars},lc:#{lastchars[-1]},:#{@list[lineno]}$"
        if lastchars[-1,1] == "\r" or @list[lineno+1].nil?
          # open a new line and keep the 10 at the end.
          append_row lineno, lastchars
        else
          # check for soft tab \n - NO EVEN THIS LOGIC IS WRONG.
          #if lastchars[-1,1] == "\n"
          if lastchars[-1,1] != ' ' and @list[lineno+1][0,1] !=' '
            #@list[lineno+1].insert 0, lastchars + ' '
            insert_wrap lineno+1, 0, lastchars + ' '
          else
            #@list[lineno+1].insert 0, lastchars 
            insert_wrap lineno+1, 0, lastchars 
          end
        end
        return lastchars, lastspace
      end
      return nil
    end
def push_last_word lineno=@current_index
       _maxlen = @maxlen || @width - @internal_width
      #lastspace = @buffer.rindex(" ")
      #lastspace = @list[lineno].rindex(/ \w/)
      line = @list[lineno]
      line = @list[lineno][0.._maxlen+1] if line.length > _maxlen
      lastspace = line.rindex(/ \w/)
      $log.debug " PUSH:2 #{lastspace},#{line},"
      # fix to ensure something returned 2010-09-07 22:40 
      lastspace = _maxlen-1 unless lastspace # added 2010-09-07 22:29  XXXX

      if !lastspace.nil?
        lastchars = @list[lineno][lastspace+1..-1]
        @list[lineno] = @list[lineno][0..lastspace]
        $log.debug "PUSH_LAST:ls:#{lastspace},lw:#{lastchars},lc:#{lastchars[-1]},:#{@list[lineno]}$"
        if lastchars[-1,1] == "\r" or @list[lineno+1].nil?
          # open a new line and keep the 10 at the end.
          append_row lineno, lastchars
        else
          # check for soft tab \n - NO EVEN THIS LOGIC IS WRONG.
          #if lastchars[-1,1] == "\n"
          if lastchars[-1,1] != ' ' and @list[lineno+1][0,1] !=' '
            #@list[lineno+1].insert 0, lastchars + ' '
            insert_wrap lineno+1, 0, lastchars + ' '
          else
            #@list[lineno+1].insert 0, lastchars 
            insert_wrap lineno+1, 0, lastchars 
          end
        end
        return lastchars, lastspace
      end
      return nil
    end
push the last word from given line to next
 I have modified it to push all words that are exceeding maxlen.
 This was needed for if i push 10 chars to next line, and the last word is less then the line will
 exceed. So i must push as many words as exceed length.
 2010-09-07 22:31 this must not return nil, or previous will crash. This happens if no space in line.