mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Text_Display.cxx
int Fl_Text_Display::wrap_uses_character(int lineEndPos) const {
  IS_UTF8_ALIGNED2(buffer(), lineEndPos)

  unsigned int c;
  
  if (!mContinuousWrap || lineEndPos == buffer()->length())
    return 1;
  
  c = buffer()->char_at(lineEndPos);
  return c == '\n' || ((c == '\t' || c == ' ') &&
                       lineEndPos + fl_utf8len(c) < buffer()->length());
}
/**
 \brief Check if the line break is caused by a \\n or by line wrapping.
 
 Line breaks in continuous wrap mode usually happen at newlines or
 whitespace.  This line-terminating character is not included in line
 width measurements and has a special status as a non-visible character.
 However, lines with no whitespace are wrapped without the benefit of a
 line terminating character, and this distinction causes endless trouble
 with all of the text display code which was originally written without
 continuous wrap mode and always expects to wrap at a newline character.

 Given the position of the end of the line, as returned by TextDEndOfLine
 or BufEndOfLine, this returns true if there is a line terminating
 character, and false if there's not.  On the last character in the
 buffer, this function can't tell for certain whether a trailing space was
 used as a wrap point, and just guesses that it wasn't.  So if an exact
 accounting is necessary, don't use this function.
 
 \param lineEndPos index of character where the line wraps
 \return 1 if a \\n character causes the line wrap
 */
\brief Check if the line break is caused by a \\n or by line wrapping.
Line breaks in continuous wrap mode usually happen at newlines or
whitespace.  This line-terminating character is not included in line
width measurements and has a special status as a non-visible character.
However, lines with no whitespace are wrapped without the benefit of a
line terminating character, and this distinction causes endless trouble
with all of the text display code which was originally written without
continuous wrap mode and always expects to wrap at a newline character.

Given the position of the end of the line, as returned by TextDEndOfLine
or BufEndOfLine, this returns true if there is a line terminating
character, and false if there's not.  On the last character in the
buffer, this function can't tell for certain whether a trailing space was
used as a wrap point, and just guesses that it wasn't.  So if an exact
accounting is necessary, don't use this function.

\param lineEndPos index of character where the line wraps
\return 1 if a \\n character causes the line wrap
\ brief Check if the line break is caused by a \\ n or by line wrapping . Line breaks in continuous wrap mode usually happen at newlines or whitespace . This line - terminating character is not included in line width measurements and has a special status as a non - visible character . However lines with no whitespace are wrapped without the benefit of a line terminating character and this distinction causes endless trouble with all of the text display code which was originally written without continuous wrap mode and always expects to wrap at a newline character . Given the position of the end of the line as returned by TextDEndOfLine or BufEndOfLine this returns true if there is a line terminating character and false if there ' s not . On the last character in the buffer this function can ' t tell for certain whether a trailing space was used as a wrap point and just guesses that it wasn ' t . So if an exact accounting is necessary don ' t use this function . \ param lineEndPos index of character where the line wraps \ return 1 if a \\ n character causes the line wrap
int Fl_Text_Display::wrap_uses_character(int lineEndPos) const {
  IS_UTF8_ALIGNED2(buffer(), lineEndPos)
  unsigned int c;
  if (!mContinuousWrap || lineEndPos == buffer()->length())
    return 1;
  c = buffer()->char_at(lineEndPos);
  return c == '\n' || ((c == '\t' || c == ' ') &&
                       lineEndPos + fl_utf8len(c) < buffer()->length());
}
int Fl_Text_Display :: wrap_uses_character ( int lineEndPos ) const { IS_UTF8_ALIGNED2 ( buffer ( ) , lineEndPos ) unsigned int c ; if ( ! mContinuousWrap || lineEndPos == buffer ( ) -> length ( ) ) return 1 ; c = buffer ( ) -> char_at ( lineEndPos ) ; return c == ' \n ' || ( ( c == ' \t ' || c == ' ' ) && lineEndPos + fl_utf8len ( c ) < buffer ( ) -> length ( ) ) ; }
\brief Check if the line break is caused by a \\n or by line wrapping.
\ brief Check if the line break is caused by a \\ n or by line wrapping .