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

fix: get value of register '=' with getreg('=',1) #114

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Conversation

ccaseiro
Copy link
Contributor

without the '1' the register gets evaluated and I get
'Vim(call):E474: Invalid argument'.

From vim documentation:
getreg('=') returns the last evaluated value of the expression
register. (For use in maps.)
getreg('=', 1) returns the expression itself, so that it can
be restored with |setreg()|. For other registers the extra
argument is ignored, thus you can always give it.

without the '1' the register gets evaluated and I get
'Vim(call):E474: Invalid argument'.

From vim documentation:
	getreg('=') returns the last evaluated value of the expression
	register.  (For use in maps.)
	getreg('=', 1) returns the expression itself, so that it can
	be restored with |setreg()|.  For other registers the extra
	argument is ignored, thus you can always give it.
@folke folke merged commit 6224ea8 into folke:main Jul 5, 2021
@folke
Copy link
Owner

folke commented Jul 5, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants