diff options
| author | Manolo Gouy <Manolo> | 2011-05-06 18:15:29 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-05-06 18:15:29 +0000 |
| commit | 2c42334c5562e3bb4a1d6b034714ad6a32195fd9 (patch) | |
| tree | 3e3931a4243a560b13034229fadcbc9b000c7de7 /src | |
| parent | 26f81a4834ddcb839efeba1f11a23d900dae6262 (diff) | |
Fix STR #2620. Obeys the tab distance value set by Fl_Text_Buffer::tab_distance(int).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 026dbe94f..17ca17f2a 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1744,7 +1744,7 @@ int Fl_Text_Display::handle_vline( int w = 0; if (prevChar=='\t') { // draw a single Tab space - int tab = (int)col_to_x(8); + int tab = (int)col_to_x(mBuffer->tab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) @@ -1777,7 +1777,7 @@ int Fl_Text_Display::handle_vline( int w = 0; if (currChar=='\t') { // draw a single Tab space - int tab = (int)col_to_x(8); + int tab = (int)col_to_x(mBuffer->tab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) @@ -3201,7 +3201,7 @@ double Fl_Text_Display::measure_proportional_character(const char *s, int xPix, IS_UTF8_ALIGNED(s) if (*s=='\t') { - int tab = (int)col_to_x(8); + int tab = (int)col_to_x(mBuffer->tab_distance()); return (((xPix/tab)+1)*tab) - xPix; } |
