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

Emacs: always jump the cursor if needed on indent #12835

Closed

Conversation

MicahChalmer
Copy link
Contributor

The rust-mode-indent-line function had a check, which ran after all the
calculations for how to indent had already happened, that skipped
actually performing the indent if the line was already at the right
indentation.

Because of that, the cursor did not jump to the indentation if the line
wasn't changing. This was particularly annoying if there was nothing
but spaces on the line and you were at the beginning of it--it looked
like the indent just wasn't working.

This removes the check and adds test cases to cover this.

The rust-mode-indent-line function had a check, which ran after all the
calculations for how to indent had already happened, that skipped
actually performing the indent if the line was already at the right
indentation.

Because of that, the cursor did not jump to the indentation if the line
wasn't changing.  This was particularly annoying if there was nothing
but spaces on the line and you were at the beginning of it--it looked
like the indent just wasn't working.

This removes the check and adds test cases to cover this.
@MicahChalmer MicahChalmer deleted the emacs-indented-already branch March 13, 2014 17:59
fasterthanlime pushed a commit to fasterthanlime/rust that referenced this pull request Jul 22, 2022
…hanlime

Introduce proc-macro-srv/sysroot-abi

Still a WIP.

This change is tracked by:

  * rust-lang/rust-analyzer#12818
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
…ls, r=y21

feat: `Quick Fix` for `bare URLs`

closes rust-lang#12835.

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: [`clippy::doc_markdown`]: `Quick Fix` for `bare URLs`
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