Skip to content

setting filetype of file in popup window might reset 'cpo' #7707

@lacygoill

Description

@lacygoill

Describe the bug

Setting the filetype of a file in a popup window might reset 'cpo'.

To Reproduce

Run this shell command:

vim -Nu NONE -S <(cat <<'EOF'
    set cpo=aABceFsMny>
    filetype indent on
    let id = popup_create('', {})
    echom 'before: ' .. &cpo
    call popup_create('', {'filter': {-> win_execute(g:id, 'setf yaml')}})
    call feedkeys(":echom 'after: ' .. &cpo\r", 't')
    redraw
    mess
EOF
)

It prints:

before: aABceFsMny>
after: aABceFs

Expected behavior

It prints:

before: aABceFsMny>
after: aABceFsMny>

Environment

  • Vim version: 8.2 Included patches: 1-2374
  • OS: Ubuntu 16.04.7 LTS
  • Terminal: xterm(363)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions