[vim/vim] Trigger WinScrolled while fold is opened or closed (Issue #21127)

Mao-Yining (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/issues/[email protected]>
mao-yining created an issue (vim/vim#21127)

I want to trigger a function while newline appears.

But I can't find a way to trigger it while open and closeing folds

Additional context:

To solve the problem that signs are too slow. So only place signs that canbe seen.

```vim
export def Render(bufnr: number = bufnr()): void
  var sy: Signify = bufnr->getbufvar('sy', null_object)
  if sy == null_object
    return
  endif
  sign_unplace('Signify', {buffer: bufnr})
  var signlist = sy.signs
  if empty(signlist)
    return
  endif
  var winid = bufnr->bufwinid()
  if winid == -1
    return
  endif
  var wininfo = winid->getwininfo()[0]
  var botline: number = wininfo.botline + 1 # botline should +1 for wraped line
  var priority: number = get(g:, 'signify_priority', 10)
  var lnum: number = wininfo.topline - 1
  while lnum < botline
    ++lnum
    var end = foldclosedend(lnum)
    if end != -1
      lnum = end
      continue
    endif
    var name = signlist->get(lnum, null_string)
    if name != null_string
      sign_place(0, 'Signify', name, bufnr, {lnum: lnum, priority: priority})
    endif
  endwhile
enddef
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/21127
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/issues/[email protected]>

-- 
-- 
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 visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/21127%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.