onivim / libvim

libvim: The core Vim editing engine as a minimal C library
https://v2.onivim.io
MIT License
691 stars 34 forks source link

feat(api): Autoindent - add `lnum` argument #209

Closed bryphe closed 4 years ago

bryphe commented 4 years ago

This updates the autoIndentCallback to also take the line number of the new line we're opening - this is because sometimes just the current line and previous line contents are not enough to determine indentation level. Passing the lnum allows us to query previous lines, too.