[vim/vim] sign_getplaced() does not return the placed signs (Issue #9136)

9 views
Skip to first unread message

rickhowe

unread,
Nov 15, 2021, 2:11:48 AM11/15/21
to vim/vim, Subscribed

Steps to reproduce

For example, after running the following code,

for ln in range(1, 10)
    call sign_define(ln, {'text': ln})
    call sign_place(0, 'test', ln, bufnr(), {'lnum': ln})
endfor

:echo sign_getdefined()
returns a list of all the defined signs as expected.

But,
:echo sign_getplaced()
returns
[{'signs': [], 'buffer': 1}].

Expected behaviour

As help says, it is expected to return a list of all the placed signs.

Operating system

Windows 10

Version of Vim

vim 8.2.3595

Logs and stack traces

No response


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Yegappan Lakshmanan

unread,
Nov 15, 2021, 10:12:17 AM11/15/21
to vim_dev, reply+ACY5DGBO7FYC7VZNJO...@reply.github.com, vim/vim, Subscribed
Hi,

On Sun, Nov 14, 2021 at 11:11 PM rickhowe <vim-dev...@256bit.org> wrote:

Steps to reproduce

For example, after running the following code,

for ln in range(1, 10)
    call sign_define(ln, {'text': ln})
    call sign_place(0, 'test', ln, bufnr(), {'lnum': ln})

Note that with this call the signs are placed in a group called 'test' and
not in the global group. To place a sign in the global group, the second
argument should be an empty string.
 

endfor

:echo sign_getdefined()
returns a list of all the defined signs as expected.

But,
:echo sign_getplaced()


The sign_getplaced() function without any arguments returns only signs in the
global group. To display the signs in the group 'test', you need to use:
 
:echo sign_getplaced(bufnr(), {'group': 'test'})

- Yegappan

vim-dev ML

unread,
Nov 15, 2021, 10:12:31 AM11/15/21
to vim/vim, vim-dev ML, Your activity

Hi,


On Sun, Nov 14, 2021 at 11:11 PM rickhowe ***@***.***> wrote:

> Steps to reproduce
>
> For example, after running the following code,
>
> for ln in range(1, 10)
> call sign_define(ln, {'text': ln})
> call sign_place(0, 'test', ln, bufnr(), {'lnum': ln})
>
>
Note that with this call the signs are placed in a group called 'test' and
not in the global group. To place a sign in the global group, the second
argument should be an empty string.


>
> endfor
>
> :echo sign_getdefined()
> returns a list of all the defined signs as expected.
>
> But,
> :echo sign_getplaced()
>

The sign_getplaced() function without any arguments returns only signs in
the
global group. To display the signs in the group 'test', you need to use:

:echo sign_getplaced(bufnr(), {'group': 'test'})

- Yegappan

>
> returns
> [{'signs': [], 'buffer': 1}].
> Expected behaviour
>
> As help says, it is expected to return a list of all the placed signs.
> Operating system
>
> Windows 10
> Version of Vim
>
> vim 8.2.3595
> Logs and stack traces
>
> *No response*

Bram Moolenaar

unread,
Nov 16, 2021, 3:36:06 PM11/16/21
to vim/vim, vim-dev ML, Comment

Closed #9136.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages