rhysd / neovim-component

<neovim-editor> WebComponent to embed Neovim to your app with great ease
https://github.com/rhysd/NyaoVim
MIT License
193 stars 18 forks source link

cursor won't stop blinking #28

Closed nwaywood closed 8 years ago

nwaywood commented 8 years ago

I'm not sure if its a bug or I'm doing something wrong, but I have tried

<dom-module id="nyaovim-app">
  <template>
    <style>
      /* CSS configurations here */
    </style>

    <!-- Component tags here -->
    <neovim-editor id="nyaovim-editor" 
        argv$="[[argv]]" 
        font-size="14" 
        font="Fura Mono for Powerline Plus Nerd File Types,monospace"></neovim-editor>
  </template>
</dom-module>
<script>
    const neovim_element = document.getElementById('neovim');
    neovim_element.editor.blink_cursor = false;
</script>

and

<dom-module id="nyaovim-app">
  <template>
    <style>
      /* CSS configurations here */
    </style>

    <!-- Component tags here -->
    <neovim-editor id="nyaovim-editor" 
        argv$="[[argv]]" 
        font-size="14" 
        blink-cursor="false"
        font="Fura Mono for Powerline Plus Nerd File Types,monospace"></neovim-editor>
  </template>
</dom-module>

but the cursor doesn't stop blinking in normal mode.

rhysd commented 8 years ago

Hmm, blink-cursor="false" should stop blinking cursor. I need to investigate.

nwaywood commented 8 years ago

@rhysd Thanks, and just to clarify, I am referring to the cursor blinking in normal mode.

rhysd commented 8 years ago

Please use no-blink-cursor attribute instead as below:

<neovim-editor id="nyaovim-editor" 
    argv$="[[argv]]" 
    font-size="14" 
    no-blink-cursor
    font="Fura Mono for Powerline Plus Nerd File Types,monospace"></neovim-editor>

I renamed the attribute because HTML element's attribute can't have default true value.

https://github.com/Polymer/polymer/issues/1812

I'll ship this fix in v0.7.0.