Skip to content

Commit

Permalink
Merge pull request #103 from kasecato/#98/comment_above_again
Browse files Browse the repository at this point in the history
#98/comment above again
  • Loading branch information
kasecato authored Jul 27, 2020
2 parents 473ba21 + 7a02059 commit aecc72c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.1.16 (July 27, 2020)

* bug fix - ctrl-enter (insert line below, insert line above) in middle of line not adding `///`. See [#98](https://github.com/kasecato/vscode-docomment/issues/98).

## 0.1.15 (July 26, 2020)

* bug fix - ctrl-enter (insert line below, insert line above) in middle of line not adding `///`. See [#98](https://github.com/kasecato/vscode-docomment/issues/98).
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docomment",
"version": "0.1.14",
"version": "0.1.15",
"publisher": "k--kato",
"engines": {
"vscode": "^1.40.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Lang/DocommentDomainCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class DocommentDomainCSharp extends DocommentDomain {

// NG: KeyCode is NOT '/' or Enter
const isActivationKey: boolean = SyntacticAnalysisCSharp.IsActivationKey(activeChar, this._config.syntax);
const isEnterKey: boolean = SyntacticAnalysisCSharp.IsEnterKey(activeChar, eventText);
const isEnterKey: boolean = SyntacticAnalysisCSharp.IsEnterKey(eventText);
if (!isActivationKey && !isEnterKey) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export class SyntacticAnalysisCSharp {
/*-------------------------------------------------------------------------
* Public Method: Comment Type
*-----------------------------------------------------------------------*/
public static IsEnterKey(activeChar: string, text: string): boolean {
return (activeChar === '') && (text.startsWith('\n') || text.startsWith("\r\n"));
public static IsEnterKey(text: string): boolean {
return (text.startsWith('\n') || text.startsWith("\r\n"));
}

public static IsInsertLineAbove(activeLine: string): boolean {
Expand Down

0 comments on commit aecc72c

Please sign in to comment.