Skip to content

[BUG] Anomalous interaction between edits and view commands #5364

@web-sst

Description

@web-sst

Version of Kakoune

dec2ee9 (current master)

Reproducer

Edits interact with view mode in anomalous ways. Suppose I have a file with the following content:

a
b
c
d
e

Running these two command aligns line "c" at the top of the view:

:execute-keys %{ggi<ret><esc>/^c$<ret>}
vt

Combining them alters the results:

:execute-keys %{ggi<ret><esc>/^c$<ret>vt}

This aligns line "d" at the top of the view.

I do not expect combining commands like this to change the behavior.

Outcome

Executing edits and view commands separately produces the expected alignment. Combining the edits and view commands produces unexpected alignment.

Expectations

Separate and combined execution of edit followed by view command should produce the same results.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions