Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Renaming variable changes all instances except on readarray #1317

Open
@LeonardoMor

Description

Code editor

Neovim

Platform

macOS Sequoia 15.5

Version

5.6.0

What steps will reproduce the bug?

Take this function:

tmpl::add() {
 [[ 1ドル && 2ドル ]] || {
 die e "add: source or targets is an empty string"
 help >&2
 exit 1
 }
 local tmplstr targets=()
 $EDITOR "$PREFIX/1ドル"
 readarray -td: targets <<<"2ドル"
 tmplstr="{{ template \"${PREFIX#*.chezmoitemplates/}/1ドル\" . }}"
 for f in "${targets[@]}"; do
 echo "$tmplstr" >"$f"
 done
}

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

All instances all the variable should be renamed.

What do you see instead?

With the cursor over any instance of targets except for the one on readarray, if you rename it, all instances are renamed correctly, except for the one on readarray.

If the cursor is over the targets on readarray and you try to rename it, you'd be told that there's nothing to rename.

Additional information

This might be somewhat similar to #1183

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /