Skip to content

Commit b85134b

Browse files
authored
Fix smart selection bug with TemplateTails (microsoft#33108)
1 parent c5e6d95 commit b85134b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/services/smartSelection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace ts.SmartSelectionRange {
2626
//
2727
// Dive in without pushing a selection range.
2828
if (isBlock(node)
29-
|| isTemplateSpan(node) || isTemplateHead(node)
29+
|| isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node)
3030
|| prevNode && isTemplateHead(prevNode)
3131
|| isVariableDeclarationList(node) && isVariableStatement(parentNode)
3232
|| isSyntaxList(node) && isVariableDeclarationList(parentNode)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
`a ${b} /**/c`
2+
3+
a ${b} c
4+
`a ${b} c`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
////`a ${b} /**/c`
4+
5+
verify.baselineSmartSelection();

0 commit comments

Comments
 (0)