From 857d5457f77f43d824f60766a6654a904fe5aeea Mon Sep 17 00:00:00 2001 From: oriash93 Date: Sun, 4 Mar 2018 07:47:29 +0200 Subject: [PATCH] Case insensitive comment string matching resolves #35589 --- src/vs/editor/contrib/comment/blockCommentCommand.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/comment/blockCommentCommand.ts b/src/vs/editor/contrib/comment/blockCommentCommand.ts index 3c8caf720d5..d6ceea7e08d 100644 --- a/src/vs/editor/contrib/comment/blockCommentCommand.ts +++ b/src/vs/editor/contrib/comment/blockCommentCommand.ts @@ -32,8 +32,11 @@ export class BlockCommentCommand implements editorCommon.ICommand { if (offset + needleLength > haystackLength) { return false; } + + const haystackUpper = haystack.toUpperCase(); + const needleUpper = needle.toUpperCase(); for (let i = 0; i < needleLength; i++) { - if (haystack.charCodeAt(offset + i) !== needle.charCodeAt(i)) { + if (haystackUpper.charCodeAt(offset + i) !== needleUpper.charCodeAt(i)) { return false; } } -- GitLab