@@ -1154,6 +1154,8 @@ COLORREF iBackColour = BLACK;
1154
1154
pixel += textsize.cx ; // start rest of line further over
1155
1155
1156
1156
}
1157
+ else
1158
+ pLine->m_iPreambleOffset = 0 ; // ensure no offset if they change it
1157
1159
1158
1160
// show the selection in a different colour
1159
1161
@@ -2008,7 +2010,10 @@ int line,
2008
2010
int iCol;
2009
2011
2010
2012
// don't do it *past* end of last word
2011
- long pixel = calculate_width (line, pLine->len , pDoc, dc) + pDoc->m_iPixelOffset + pDoc->m_TextRectangle .left ;
2013
+ long pixel = calculate_width (line, pLine->len , pDoc, dc) +
2014
+ pDoc->m_iPixelOffset +
2015
+ pDoc->m_TextRectangle .left +
2016
+ pLine->m_iPreambleOffset ;
2012
2017
2013
2018
if (point.x < pixel &&
2014
2019
pDoc->FindStyle (pLine, col, iCol, pStyle, foundpos))
@@ -3399,7 +3404,9 @@ ASSERT_VALID(pDoc);
3399
3404
int iCol;
3400
3405
3401
3406
// don't do it *past* end of last word
3402
- long pixel = calculate_width (line, pLine->len , pDoc, dc) + pDoc->m_iPixelOffset ;
3407
+ long pixel = calculate_width (line, pLine->len , pDoc, dc) +
3408
+ pDoc->m_iPixelOffset +
3409
+ pLine->m_iPreambleOffset ;
3403
3410
3404
3411
if (point.x < pixel &&
3405
3412
pDoc->FindStyle (pLine, col, iCol, pStyle, foundpos))
@@ -4135,7 +4142,10 @@ BOOL CMUSHView::OnToolTipNeedText(UINT id, NMHDR * pNMHDR, LRESULT * pResult)
4135
4142
int iCol = 0 ;
4136
4143
4137
4144
// don't do it *past* end of last word
4138
- long pixel = calculate_width (line, pLine->len , pDoc, dc) + pDoc->m_iPixelOffset + pDoc->m_TextRectangle .left ;
4145
+ long pixel = calculate_width (line, pLine->len , pDoc, dc) +
4146
+ pDoc->m_iPixelOffset +
4147
+ pDoc->m_TextRectangle .left +
4148
+ pLine->m_iPreambleOffset ;
4139
4149
4140
4150
// m_ToolTip.SendMessage (TTM_SETTITLE, TTI_INFO, (LPARAM) Translate ("Line information") );
4141
4151
0 commit comments