Skip to content

Commit

Permalink
优化花括号缩进
Browse files Browse the repository at this point in the history
  • Loading branch information
iwxyi committed Oct 20, 2019
1 parent 8ce6859 commit 9d4e99a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All notable changes to the "lazykey" extension will be documented in this file.
- Repair the case of `cout < <`
- Support more case like converting `qDebug(),,` to `qDebug() << `
- Auto detect whether `< >` or `" "` to be used after `#include` by space key
- May fixed converting `9` to `()` twice
- Completely fix converting `9` / `0` to `()` twice
- Fix putting the current line in the code block bt `[`
- Add `{ }` at the end of the line beginning with `if/for/...`
- Auto indent when inserting `{ }` in a blank line
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "LazyKey",
"publisher": "mrxy001",
"description": "Minimize keystrokes through automated keymaps",
"version": "0.0.1",
"version": "0.0.2",
"keywords": ["lazy", "key", "auto", "macros"],
"engines": {
"vscode": "^1.36.0"
Expand Down
2 changes: 1 addition & 1 deletion src/bind_enter.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function toIndent(editor, document, position)

// 单个 if 后面的句子,是否需要 outindent
var outdent = false;
if (prevLine.indexOf('{') == -1) {
if (prevLine.indexOf('{') > -1) {
outdent = false;
}
else if (line.indexOf(';') > -1
Expand Down

0 comments on commit 9d4e99a

Please sign in to comment.