> But how is `getbufinfo({expr})[0].lnum` userful? I honestly don't
> understand the purpose of it since the buffer needs to be focused.
> Isn't it the same as `line('.')`?Try editing the buffer in the current window and then switching to another buffer, then it works as you expect. If the buffer is open in another window (or several windows), you probably want to get the cursor position of the window, not the buffer. -- hundred-and-one symptoms of being an internet addict: 121. You ask for e-mail adresses instead of telephone numbers. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202008042124.074LOuBQ3126100%40masaka.moolenaar.net.
