[Backport release-0.8] fix(tutor): fix problem of failing to get buf name (#20985)

fix(tutor): fix problem of failing to get buf name

Closes https://github.com/neovim/neovim/issues/20920

(cherry picked from commit 86f2863e8f)

Co-authored-by: erw7 <erw7.github@gmail.com>
This commit is contained in:
github-actions[bot] 2022-11-06 19:23:34 -08:00 committed by GitHub
parent a35efe1e4f
commit 8e28d8a370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ function! tutor#CheckLine(line)
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
let bufn = bufnr('%')
let ctext = getline(a:line)
let signs = sign_getplaced('.', {'lnum': a:line})[0].signs
let signs = sign_getplaced(bufn, {'lnum': a:line})[0].signs
if !empty(signs)
call sign_unplace('', {'id': signs[0].id})
endif