update .gitignore
[nedit-bw.git] / sh-bg-newline.diff
blob925610465d9a1b09d4df36f029716d93a32934ca
1 ---
3 source/textDisp.c | 9 +++++----
4 1 files changed, 5 insertions(+), 4 deletions(-)
6 diff --quilt old/source/textDisp.c new/source/textDisp.c
7 --- old/source/textDisp.c
8 +++ new/source/textDisp.c
9 @@ -2446,17 +2446,18 @@ static int styleOfPos(textDisp *textD, i
11 pos = lineStartPos + min(lineIndex, lineLen);
13 if (lineIndex >= lineLen)
14 style = FILL_MASK;
15 - else if (styleBuf != NULL) {
16 - style = (unsigned char)BufGetCharacter(styleBuf, pos);
17 - if (style == textD->unfinishedStyle) {
18 + if (styleBuf != NULL) {
19 + int styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
20 + if (styleChar == textD->unfinishedStyle && textD->highlightCBArg != NULL) {
21 /* encountered "unfinished" style, trigger parsing */
22 (textD->unfinishedHighlightCB)(textD, pos, textD->highlightCBArg);
23 - style = (unsigned char)BufGetCharacter(styleBuf, pos);
24 + styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
26 + style |= styleChar;
28 if (inSelection(&buf->primary, pos, lineStartPos, dispIndex))
29 style |= PRIMARY_MASK;
30 if (inSelection(&buf->highlight, pos, lineStartPos, dispIndex))
31 style |= HIGHLIGHT_MASK;