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

T<ret> on windows selects the previous newline #8057

Closed
sicher opened this issue Aug 25, 2023 · 1 comment · Fixed by #8111
Closed

T<ret> on windows selects the previous newline #8057

sicher opened this issue Aug 25, 2023 · 1 comment · Fixed by #8111
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@sicher
Copy link

sicher commented Aug 25, 2023

Summary

Pressing T<ret> on a line of text has the same effect as pressing F<ret>, the previous newline is selected:

image

Note that setting line-ending to lf makes T behave correctly.

Reproduction Steps

  1. Put cursor on a line of text.
  2. Press T<ret>

Platform

Windows

Terminal Emulator

Windows Terminal Version: 1.17.11461.0

Helix Version

helix 23.05 (7f5940b)

@sicher sicher added the C-bug Category: This is a bug label Aug 25, 2023
@sicher sicher changed the title T<ret> on windows selects the newline on the previous line T<ret> on windows selects the previous newline Aug 25, 2023
@kirawi kirawi added E-easy Call for participation: Experience needed to fix: Easy / not much A-core Area: Helix core improvements E-good-first-issue Call for participation: Issues suitable for new contributors A-helix-term Area: Helix term improvements and removed A-core Area: Helix core improvements labels Aug 26, 2023
@kirawi
Copy link
Member

kirawi commented Aug 29, 2023

// TODO: this isn't quite correct when CRLF is involved.
// This hack will work in most cases, since documents don't
// usually mix line endings. But we should fix it eventually
// anyway.
{
doc!(cx.editor).line_ending.as_str().chars().next().unwrap()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants