Author: matt
Date: 2010-04-05 15:26:29 -0700 (Mon, 05 Apr 2010)
New Revision: 7450
Log:
A few more comments.
Modified:
branches/branch-1.3/FL/Fl_Text_Buffer.H
branches/branch-1.3/src/Fl_Text_Display.cxx
Modified: branches/branch-1.3/FL/Fl_Text_Buffer.H
===================================================================
--- branches/branch-1.3/FL/Fl_Text_Buffer.H 2010-04-05 22:18:14 UTC (rev
7449)
+++ branches/branch-1.3/FL/Fl_Text_Buffer.H 2010-04-05 22:26:29 UTC (rev
7450)
@@ -411,7 +411,6 @@
/**
Returns a non 0 value if text has been selected, 0 otherwise
- \todo unicode check
*/
int selected() const { return mPrimary.selected(); }
@@ -468,7 +467,6 @@
/**
Returns a non 0 value if text has been selected in the secondary
text selection, 0 otherwise
- \todo unicode check
*/
int secondary_selected() { return mSecondary.selected(); }
@@ -527,7 +525,6 @@
/**
Returns the highlighted text. When you are done with the
text, free it using the free() function.
- \todo unicode check
*/
int highlight() { return mHighlight.selected(); }
@@ -786,25 +783,21 @@
/**
Returns the primary selection.
- \todo unicode check
*/
const Fl_Text_Selection* primary_selection() const { return &mPrimary; }
/**
Returns the primary selection.
- \todo unicode check
*/
Fl_Text_Selection* primary_selection() { return &mPrimary; }
/**
Returns the secondary selection.
- \todo unicode check
*/
const Fl_Text_Selection* secondary_selection() const { return &mSecondary; }
/**
Returns the current highlight selection.
- \todo unicode check
*/
const Fl_Text_Selection* highlight_selection() const { return &mHighlight; }
@@ -944,6 +937,10 @@
*/
const char *address(int pos) const
{ return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; }
+
+ /**
+ Convert a byte offset in buffer into a memory address.
+ */
char *address(int pos)
{ return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; }
Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2010-04-05 22:18:14 UTC (rev
7449)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2010-04-05 22:26:29 UTC (rev
7450)
@@ -1506,7 +1506,7 @@
buf->tab_distance());
charStyle = position_style( lineStartPos, lineLen, charIndex,
outIndex + dispIndexOffset );
- for ( i = 0; i < charLen; i++ ) {
+ for ( i = 0; i < charLen; i++ ) { // FIXME: this rips apart the utf-8
sequneces
if ( i != 0 && charIndex < lineLen && lineStr[ charIndex ] == '\t' )
charStyle = position_style( lineStartPos, lineLen,
charIndex, outIndex + dispIndexOffset );
@@ -1548,7 +1548,7 @@
buf->tab_distance());
charStyle = position_style( lineStartPos, lineLen, charIndex,
outIndex + dispIndexOffset );
- for ( i = 0; i < charLen; i++ ) {
+ for ( i = 0; i < charLen; i++ ) { // FIXME: this rips apart the utf-8
sequneces
if ( i != 0 && charIndex < lineLen && lineStr[ charIndex ] == '\t' )
charStyle = position_style( lineStartPos, lineLen,
charIndex, outIndex + dispIndexOffset );
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit