Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitution preview for "\#" is incorrect #1829

Open
blahgeek opened this issue Aug 25, 2023 · 1 comment
Open

Substitution preview for "\#" is incorrect #1829

blahgeek opened this issue Aug 25, 2023 · 1 comment

Comments

@blahgeek
Copy link

Issue type

  • Bug report

Environment

Emacs version: 29.1
Operating System: linux
Evil version: 1.15.0
Evil installation type: borg (git clone)
Graphical/Terminal: graphical
Tested in a make emacs session (see CONTRIBUTING.md): yes

Reproduction steps

  • :%s/^/\#/g, do NOT press enter, see the preview result

Expected behavior

Shows substitution preview 0,1,2,3,... in each line

Actual behavior

Shows substitution preview 0,0,0,0,... in each line

Further notes

The final result (after pressing enter) is correct though.

@axelf4
Copy link
Collaborator

axelf4 commented Aug 25, 2023

This is a (semi-)intentional limitation: Currently the substitution preview only processes the part of the buffer that is visible. Showing an accurate counter would require processing the entire range, which could be bad for large buffers. I am not sure whether this should be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants