Skip to content

Commit 4105abc

Browse files
Merge master into feature/amazonqLSP
2 parents 4a89ddc + ef926e4 commit 4105abc

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Code Review: Fixed a bug where applying a fix did not update the positions of other issues in the same file."
4+
}

packages/amazonq/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@
210210
"type": "tree",
211211
"id": "aws.amazonq.SecurityIssuesTree",
212212
"name": "%AWS.amazonq.security%",
213-
"when": "!aws.isSageMaker && !aws.isWebExtHost && !aws.amazonq.showLoginView"
213+
"when": "!aws.isSageMaker && !aws.isWebExtHost && !aws.amazonq.showLoginView",
214+
"visibility": "collapsed"
214215
},
215216
{
216217
"type": "webview",

packages/core/src/codewhisperer/commands/basicCommands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ export const applySecurityFix = Commands.declare(
464464
new vscode.Range(document.lineAt(0).range.start, document.lineAt(document.lineCount - 1).range.end),
465465
updatedContent
466466
)
467-
SecurityIssueProvider.instance.disableEventHandler()
468467
const isApplied = await vscode.workspace.applyEdit(edit)
469468
if (isApplied) {
470469
void document.save().then((didSave) => {

packages/core/src/codewhisperer/service/securityIssueProvider.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export class SecurityIssueProvider {
1212
}
1313

1414
private _issues: AggregatedCodeScanIssue[] = []
15-
private _disableEventHandler: boolean = false
1615
public get issues() {
1716
return this._issues
1817
}
@@ -21,19 +20,11 @@ export class SecurityIssueProvider {
2120
this._issues = issues
2221
}
2322

24-
public disableEventHandler() {
25-
this._disableEventHandler = true
26-
}
27-
2823
public handleDocumentChange(event: vscode.TextDocumentChangeEvent) {
2924
// handleDocumentChange function may be triggered while testing by our own code generation.
3025
if (!event.contentChanges || event.contentChanges.length === 0) {
3126
return
3227
}
33-
if (this._disableEventHandler) {
34-
this._disableEventHandler = false
35-
return
36-
}
3728
const { changedRange, lineOffset } = event.contentChanges.reduce(
3829
(acc, change) => ({
3930
changedRange: acc.changedRange.union(change.range),

0 commit comments

Comments
 (0)