Fix smart selection bug with TemplateTails (#33108)

This commit is contained in:
Andrew Branch 2019-09-05 09:01:41 -07:00 committed by GitHub
parent c5e6d95e93
commit b85134b00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -26,7 +26,7 @@ namespace ts.SmartSelectionRange {
//
// Dive in without pushing a selection range.
if (isBlock(node)
|| isTemplateSpan(node) || isTemplateHead(node)
|| isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node)
|| prevNode && isTemplateHead(prevNode)
|| isVariableDeclarationList(node) && isVariableStatement(parentNode)
|| isSyntaxList(node) && isVariableDeclarationList(parentNode)

View File

@ -0,0 +1,4 @@
`a ${b} /**/c`
a ${b} c
`a ${b} c`

View File

@ -0,0 +1,5 @@
/// <reference path="fourslash.ts" />
////`a ${b} /**/c`
verify.baselineSmartSelection();