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

Go: Extra { and ( being created when pasting #2015

Closed
mizzunet opened this issue Apr 8, 2022 · 3 comments
Closed

Go: Extra { and ( being created when pasting #2015

mizzunet opened this issue Apr 8, 2022 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@mizzunet
Copy link

mizzunet commented Apr 8, 2022

Summary

Extra end pairing being created for { and ( when pasting text having these start pairing.

Reproduction Steps

I tried this:

  1. hx main.go
  2. Paste both
type item struct {
	StoryURL  string
}
type item struct (
	StoryURL  string
)

I expected this to happen:
Paste it normaly.

Instead, this happened:
See that it becomes,

type item struct {
	StoryURL  string
}
}
type item struct (
	StoryURL  string
)
)

Helix log

~/.cache/helix/helix.log
󰅂 cat .cache/helix/helix.log 
2022-04-08T13:55:37.895 helix_view::editor [ERROR] Failed to initialize the LSP for `source.go` { cannot find binary path }

Platform

Linux

Terminal Emulator

foot

Helix Version

22.03

@mizzunet mizzunet added the C-bug Category: This is a bug label Apr 8, 2022
@CptPotato
Copy link
Contributor

CptPotato commented Apr 8, 2022

Do you paste using SpaceP / Spacep?

If you paste through the terminal instead it usually causes indents and braces/quotes to break, since it's interpreted as separate keystrokes.

@mizzunet
Copy link
Author

mizzunet commented Apr 8, 2022

Do you paste using SpaceP / Spacep?

No. I paste the text in insert mode by Ctrl+Shift+V.

I just tried Space P/p. No issue with it.

@the-mikedavis
Copy link
Member

See #1021 (comment)

Until the linked crossterm PR is merged, space-p is the go-to for pasting from clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants