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

Copy/pasting goal in Infoview collapses spacing between hypothesis names #398

Closed
kmill opened this issue Feb 18, 2024 · 1 comment · Fixed by #423
Closed

Copy/pasting goal in Infoview collapses spacing between hypothesis names #398

kmill opened this issue Feb 18, 2024 · 1 comment · Fixed by #423
Labels
bug Something isn't working

Comments

@kmill
Copy link

kmill commented Feb 18, 2024

Description

Copy/pasting the goal state from the Infoview is useful when making examples, to document what the goal state is supposed to be. However, with the way the goal state is being rendered, there is no space between local hypothesis names or between a local hypothesis name and the :.

Steps to Reproduce

Take for example

example (P Q : Nat → Int → Prop) : ∀ x y, P x y ↔ Q x y := by
  intro x y
  sorry

and move your cursor at the start of sorry.

This is the goal in the Infoview:

image

Select all the text:

image

Copy it (with Cmd-C in my case) and then paste it somewhere.

Expected behavior: You get

P Q : ℕ → ℤ → Prop
x : ℕ
y : ℤ
⊢ P x y ↔ Q x y

Actual behavior: You get

PQ: ℕ → ℤ → Prop
x: ℕ
y: ℤ
⊢ P x y ↔ Q x y

Versions

Version of vscode-lean4: v0.0.128

#eval Lean.versionString -- "4.6.0-rc1"

OS: macOS 14.1.1 on M2

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@kmill kmill added the bug Something isn't working label Feb 18, 2024
@kmill
Copy link
Author

kmill commented Feb 18, 2024

If I understand it correctly, the issue is from the fact that the spacing is created using the mr1 style here rather than by perhaps adding   here like how it's added after the colon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant