diff options
| author | John Ehresman <unknown> | 2017-03-10 08:57:25 +1100 | 
|---|---|---|
| committer | John Ehresman <unknown> | 2017-03-10 08:57:25 +1100 | 
| commit | 43cd19e34362bb637d4deb7677c835f00d82766b (patch) | |
| tree | c15c981d7b72b5379fc1f4cbc315057402608e3b | |
| parent | 8b6cb02f80387900baf8b9166bcf332bcf778a38 (diff) | |
| download | scintilla-mirror-43cd19e34362bb637d4deb7677c835f00d82766b.tar.gz | |
Bug [#1918]. Fix failure when lexing starts at line 3+ of a multiline f-string.
| -rw-r--r-- | lexers/LexPython.cxx | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index bc4bc877b..f667cb32c 100644 --- a/lexers/LexPython.cxx +++ b/lexers/LexPython.cxx @@ -511,8 +511,9 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in  	// Set up fstate stack from last line and remove any subsequent ftriple at eol states  	std::map<int, std::vector<SingleFStringExpState> >::iterator it;  	it = ftripleStateAtEol.find(lineCurrent - 1); -	if (it != ftripleStateAtEol.end()) { +	if (it != ftripleStateAtEol.end() && !it->second.empty()) {  		fstringStateStack = it->second; +		currentFStringExp = &fstringStateStack.back();  	}  	it = ftripleStateAtEol.lower_bound(lineCurrent);  	if (it != ftripleStateAtEol.end()) { | 
