Skip to content

Commit

Permalink
Rebase against the upstream e95fca1
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: e95fca1
  • Loading branch information
Eclipse Che Sync committed Sep 26, 2023
2 parents 008e83e + e95fca1 commit c8808d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ export class CommentService extends Disposable implements ICommentService {
removeContinueOnComment(pendingComment: { range: IRange; uri: URI; owner: string }): PendingCommentThread | undefined {
const pendingComments = this._continueOnComments.get(pendingComment.owner);
if (pendingComments) {
return pendingComments.splice(pendingComments.findIndex(comment => comment.uri.toString() === pendingComment.uri.toString() && Range.equalsRange(comment.range, pendingComment.range)), 1)[0];
const commentIndex = pendingComments.findIndex(comment => comment.uri.toString() === pendingComment.uri.toString() && Range.equalsRange(comment.range, pendingComment.range));
if (commentIndex > -1) {
return pendingComments.splice(commentIndex, 1)[0];
}
}
return undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class CommentThreadBody<T extends IRange | ICellRange = IRange> extends D

this._register(dom.addDisposableListener(this._commentsElement, dom.EventType.KEY_DOWN, (e) => {
const event = new StandardKeyboardEvent(e as KeyboardEvent);
if (event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow)) {
if ((event.equals(KeyCode.UpArrow) || event.equals(KeyCode.DownArrow)) && (!this._focusedComment || !this._commentElements[this._focusedComment].isEditing)) {
const moveFocusWithinBounds = (change: number): number => {
if (this._focusedComment === undefined && change >= 0) { return 0; }
if (this._focusedComment === undefined && change < 0) { return this._commentElements.length - 1; }
Expand Down

0 comments on commit c8808d8

Please sign in to comment.