mirror of
https://github.com/ScintillaOrg/lexilla.git
synced 2025-05-08 19:06:45 +08:00
#275 Backtrack to the beginning of multiline strings/comments for folding
This commit is contained in:
parent
3ace72f009
commit
5cfd04a7f7
@ -599,7 +599,8 @@
|
||||
</li>
|
||||
<li>
|
||||
Lexer added for Dart "dart".
|
||||
<a href="https://github.com/ScintillaOrg/lexilla/pull/265">Pull request #265</a>.
|
||||
<a href="https://github.com/ScintillaOrg/lexilla/pull/265">Pull request #265</a>,
|
||||
<a href="https://github.com/ScintillaOrg/lexilla/pull/275">Pull request #275</a>.
|
||||
</li>
|
||||
<li>
|
||||
Lexer added for troff / nroff "troff".
|
||||
|
@ -605,6 +605,15 @@ void LexerDart::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initSty
|
||||
Accessor styler(pAccess, nullptr);
|
||||
const Sci_PositionU endPos = startPos + lengthDoc;
|
||||
Sci_Position lineCurrent = styler.GetLine(startPos);
|
||||
while (lineCurrent > 0) {
|
||||
lineCurrent--;
|
||||
startPos = styler.LineStart(lineCurrent);
|
||||
initStyle = (startPos > 0) ? styler.StyleIndexAt(startPos) : 0;
|
||||
if (initStyle != SCE_DART_COMMENTBLOCKDOC && initStyle != SCE_DART_COMMENTBLOCK &&
|
||||
initStyle != SCE_DART_TRIPLE_RAWSTRING_SQ && initStyle != SCE_DART_TRIPLE_RAWSTRING_DQ &&
|
||||
initStyle != SCE_DART_TRIPLE_STRING_SQ && initStyle != SCE_DART_TRIPLE_STRING_DQ)
|
||||
break;
|
||||
}
|
||||
FoldLineState foldPrev(0);
|
||||
int levelCurrent = SC_FOLDLEVELBASE;
|
||||
if (lineCurrent > 0) {
|
||||
|
@ -18,5 +18,3 @@ keywords3.*.dart=fBigInt Comparable Comparator Completer DateTime Deprecated \
|
||||
SocketException SplayTreeMap SplayTreeSet StackTrace Stopwatch Stream String \
|
||||
StringBuffer StringSink Symbol SystemHash Timer Type Uri UriData WeakReference
|
||||
keywords4.*.dart=Spacecraft
|
||||
|
||||
testlexers.per.line.disable=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user