micro-editor / micro-editor/micro

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

Open
#3,081 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect cmd/micro/micro.go around lines 289-290 and 351-353, following the clipboard creation attempt and its error check. Determine whether clipboard use occurs between them and whether the check should be moved next to the operation that can cause the error. Done means the ordering is corrected or confirmed as intentional without leaving the check separated from its cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.