Skip to content

Commit

Permalink
change property: blink-cursor -> no-blink-cursor (Fix #28)
Browse files Browse the repository at this point in the history
because HTML attribute can't have true default value.

Polymer/polymer#1812
  • Loading branch information
rhysd committed Aug 7, 2016
1 parent 216eaf6 commit 9a2b528
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You can customize `<neovim-editor>` with the following properties:
| `on-error` | Callback function for Neovim errors. | `null` |
| `disable-alt-key` | Input `{char}` on `<A-{char}>`. | `false` |
| `cursor-draw-delay` | Delay in millisec before drawing cursor. | `10` |
| `blink-cursor` | Blink cursor or not. | `true` |
| `no-blink-cursor` | Blink cursor or not. | `false` |


## `<neovim-editor>` APIs
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Polymer({
type: Number,
value: 10,
},
blinkCursor: {
noBlinkCursor: {
type: Boolean,
value: true,
value: false,
},
editor: Object,
onProcessAttached: Object,
Expand All @@ -54,7 +54,7 @@ Polymer({
this.lineHeight,
this.disableAltKey,
this.cursorDrawDelay,
this.blinkCursor
!this.noBlinkCursor
);
this.resizeHandler = null;

Expand Down
2 changes: 1 addition & 1 deletion src/neovim/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class NeovimStore extends EventEmitter {
this.line_height = 1.2;
this.alt_key_disabled = false;
this.cursor_draw_delay = 10;
this.blink_cursor = true;
this.blink_cursor = false;
this.cursor_blink_interval = 1000;
this.dispatch_token = this.dispatcher.register(this.receiveAction.bind(this));
}
Expand Down
3 changes: 2 additions & 1 deletion test/unit/store_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('NeovimStore', () => {
assert.equal(s.line_height, 1.2);
assert.equal(s.alt_key_disabled, false);
assert.equal(s.cursor_draw_delay, 10);
assert.equal(s.blink_cursor, true);
assert.equal(s.blink_cursor, false);
assert.equal(s.cursor_blink_interval, 1000);
});
});
Expand Down Expand Up @@ -625,6 +625,7 @@ describe('NeovimStore', () => {
s.on('blink-cursor-stopped', () => {
flag = true;
});
s.dispatcher.dispatch(A.startBlinkCursor());
s.dispatcher.dispatch(A.stopBlinkCursor());
assert.isTrue(flag, 'blink-cursor-stopped event was not fired');
flag = false;
Expand Down

0 comments on commit 9a2b528

Please sign in to comment.