mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix smart selection bug with TemplateTails (#33108)
This commit is contained in:
parent
c5e6d95e93
commit
b85134b00d
@ -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)
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
`a ${b} /**/c`
|
||||
|
||||
a ${b} c
|
||||
`a ${b} c`
|
||||
5
tests/cases/fourslash/smartSelection_templateStrings2.ts
Normal file
5
tests/cases/fourslash/smartSelection_templateStrings2.ts
Normal file
@ -0,0 +1,5 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////`a ${b} /**/c`
|
||||
|
||||
verify.baselineSmartSelection();
|
||||
Loading…
x
Reference in New Issue
Block a user