Skip to content

Commit c130505

Browse files
authored
Merge pull request microsoft#188968 from microsoft/merogge/focus-last-r
fix off by 1 error so last chat response can be reached
2 parents 2805396 + 46802e0 commit c130505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class ChatWidget extends Disposable implements IChatWidget {
189189
return;
190190
}
191191
const indexToFocus = type === 'next' ? targetIndex + 1 : targetIndex - 1;
192-
if (indexToFocus < 0 || indexToFocus === responseItems.length - 1) {
192+
if (indexToFocus < 0 || indexToFocus > responseItems.length - 1) {
193193
return;
194194
}
195195
this.focus(responseItems[indexToFocus]);

0 commit comments

Comments
 (0)