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

Backspace ignored cursor position #36

Merged
merged 2 commits into from
Dec 25, 2020

Conversation

tjmtmmnk
Copy link
Contributor

backspace ignored cursor position. (removed latest input rune)

I fixed backspace operate to consider cursor position.

I confirmed it by added test.

@codecov
Copy link

codecov bot commented Dec 25, 2020

Codecov Report

Merging #36 (776f827) into master (0d9e17e) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   85.35%   85.37%   +0.02%     
==========================================
  Files           5        5              
  Lines         553      554       +1     
==========================================
+ Hits          472      473       +1     
  Misses         66       66              
  Partials       15       15              

Copy link
Owner

@ktr0731 ktr0731 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! LGTM 👍

@@ -143,6 +143,10 @@ func TestFind(t *testing.T) {
{tcell.KeyBackspace2, rune(tcell.KeyBackspace2), tcell.ModNone},
{tcell.KeyBackspace2, rune(tcell.KeyBackspace2), tcell.ModNone},
}...)...)},
"arrow left backspace": {append(runes("オレンジ"), keys([]input{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ktr0731 ktr0731 merged commit 0555829 into ktr0731:master Dec 25, 2020
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