zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

`Clipboard erorr check` isn't after method that can cause it #3081

Open dustdfg opened 7 months ago

dustdfg commented 7 months ago

Description of the problem or steps to reproduce

https://github.com/zyedidia/micro/blob/d8e9d61a955edf6f58c1533012d8a25728ba65be/cmd/micro/micro.go#L289-L290

https://github.com/zyedidia/micro/blob/d8e9d61a955edf6f58c1533012d8a25728ba65be/cmd/micro/micro.go#L351-L353

Between attempt to create clipboard and check if it was correct are nearly ~60 lines of code. I don't know if it is for purpose but I didn't so clipboard use between those place (and it shouldn't be because error could occur). One of the parts should be moved next to another? ¯\(ツ)\

Specifications

Commit hash: d8e9d61a955e