Skip to content

:w breaks symlink chains #11408

Open
Open
@nestor-custodio

Description

Summary

When editing a file opened via a chain of symlinks, a :w will write into the file the opened symlink points to, not the actual data source. This breaks the symlink chain, leading to file changes which are essentially orphaned from backup processes, source control, etc.

Reproduction Steps

Asciinema recording available here.

I tried this:

  1. With a symlink sequence of a🡐b🡐c🡐d🡐e ...
  2. Editing "a" writes to "a", as expected.
  3. Editing "b" writes to "a", as expected.
  4. Editing "e" writes to "d", breaking the symlink chain.

I expected this to happen:

Editing "a", "b", "c", "d", or "e" all yield the same end result: "a" is updated.


Instead, this happened:

Editing "e" replaced "d", meaning "d" and "e" no longer reflect the same data as "a", "b", and "c". There are now two versions of this file.

Helix log

(The above actions write no new lines into the Helix log.)

Platform

Linux (Ubuntu 24.04, no DE)

Terminal Emulator

(run in text mode; no terminal emulator)

Installation Method

releases page

Helix Version

helix 24.7 (079f544)

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions