Skip to content

Commit

Permalink
Fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
formulahendry committed Nov 9, 2016
1 parent 77a910a commit d1989ab
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### 0.0.8
* Fix [GitHub issue#11](https://github.com/formulahendry/vscode-auto-rename-tag/issues/11)

### 0.0.7
* Fix [GitHub issue#8](https://github.com/formulahendry/vscode-auto-rename-tag/issues/8)

### 0.0.6
* Merge [PR#7](https://github.com/formulahendry/vscode-auto-rename-tag/pull/7): Remove console.log
* Update README.md to clarify the configuration for `auto-rename-tag.activationOnLanguage`

### 0.0.5
* Fix [GitHub issue#6](https://github.com/formulahendry/vscode-auto-rename-tag/issues/6)

### 0.0.4
* Add support for tag name that contains ```- _ : .```

### 0.0.3
* Fix paired tags not updated when there are void elements or self-closing tags between paired tags
* Fix [GitHub issue#2](https://github.com/formulahendry/vscode-auto-rename-tag/issues/2)
* Fix [GitHub issue#3](https://github.com/formulahendry/vscode-auto-rename-tag/issues/3)
* Parse document independently instead of using SAXParser of parse5 npm package to avoid uncontrollable parse behavior

### 0.0.2
* Update logo

### 0.0.1
* Initial Release
25 changes: 1 addition & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,7 @@ By default, it is `["*"]` and will be activated for all languages.
**Note:** The setting should be set with language id defined in [VS Code](https://github.com/Microsoft/vscode/tree/master/extensions). Taking [javascript definition](https://github.com/Microsoft/vscode/blob/master/extensions/javascript/package.json) as an example, we need to use `javascript` for `.js` and `.es6`, use `javascriptreact` for `.jsx`. So, if you want to enable this extension on `.js` file, you need to add `javascript` in settings.json.

## Change Log
### 0.0.7
* Fix [GitHub issue#8](https://github.com/formulahendry/vscode-auto-rename-tag/issues/8)

### 0.0.6
* Merge [PR#7](https://github.com/formulahendry/vscode-auto-rename-tag/pull/7): Remove console.log
* Update README.md to clarify the configuration for `auto-rename-tag.activationOnLanguage`

### 0.0.5
* Fix [GitHub issue#6](https://github.com/formulahendry/vscode-auto-rename-tag/issues/6)

### 0.0.4
* Add support for tag name that contains ```- _ : .```

### 0.0.3
* Fix paired tags not updated when there are void elements or self-closing tags between paired tags
* Fix [GitHub issue#2](https://github.com/formulahendry/vscode-auto-rename-tag/issues/2)
* Fix [GitHub issue#3](https://github.com/formulahendry/vscode-auto-rename-tag/issues/3)
* Parse document independently instead of using SAXParser of parse5 npm package to avoid uncontrollable parse behavior

### 0.0.2
* Update logo

### 0.0.1
* Initial Release
See Change Log [here](CHANGELOG.md)

## Issues
Submit the [issues](https://github.com/formulahendry/vscode-auto-rename-tag/issues) if you find any bug or have any suggestion.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "auto-rename-tag",
"displayName": "Auto Rename Tag",
"description": "Auto rename paired HTML/XML tag",
"version": "0.0.7",
"version": "0.0.8",
"publisher": "formulahendry",
"icon": "images/logo.png",
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions src/tagManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export class TagManager {
let cursorPositon = selection.active;
if (event.contentChanges[0].text === "" || !selection.start.isEqual(selection.end)) {
if (selection.start.isEqual(selection.end)) {
if (selection.start.character === 0) {
return;
}
cursorPositon = cursorPositon.translate(0, -1);
} else {
// Handle deletion or update of multi-character
Expand Down

0 comments on commit d1989ab

Please sign in to comment.