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

Improve newline behavior of kill-whole-line #8983

Closed
wants to merge 1 commit into from

Conversation

SeekingBlues
Copy link
Contributor

Description

Previously, kill-whole-line kills the line and its following newline. This is insufficient when we are on the last line, because it would not actually clear the line. The cursor would stay on the line, which is not the correct behavior for bindings like dd.

Also, cc in vi-mode used kill-whole-line, which is not correct because it should not remove any newlines. We have to introduce another special input function (kill-inner-line) to fix this.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

Previously, `kill-whole-line` kills the line and its following
newline. This is insufficient when we are on the last line, because
it would not actually clear the line. The cursor would stay on the
line, which is not the correct behavior for bindings like `dd`.

Also, `cc` in vi-mode used `kill-whole-line`, which is not correct
because it should not remove any newlines. We have to introduce
another special input function (`kill-inner-line`) to fix this.
@ridiculousfish
Copy link
Member

LGTM. Merged as cf620c8. Thank you, great fix!

@ridiculousfish ridiculousfish added this to the fish 3.5.0 milestone Jun 4, 2022
@zanchey zanchey closed this Jun 7, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants