neovim / neovim-ruby

Ruby support for Neovim
MIT License
337 stars 17 forks source link

Index 0 yields the last line #97

Closed BertramScharpf closed 11 months ago

BertramScharpf commented 11 months ago

This NeoVim command yields the last line of the buffer:

:ruby puts VIM::Buffer.current[0]

The problem arises in lib/neovim/buffer.rb, line 59.

def [] index
  check_index index
  @lines[index - 1]
end

Your coding style won't be fixed by me.