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

rust-beginning-of-defun can not find real function #222

Closed
Dushistov opened this issue Aug 2, 2017 · 2 comments
Closed

rust-beginning-of-defun can not find real function #222

Dushistov opened this issue Aug 2, 2017 · 2 comments

Comments

@Dushistov
Copy link

As described in comment of kwrooijen/cargo.el#41 I have problem with rust-beginning-of-defun.

With rust code in literal string rust-beginning-of-defun works in wrong way:

fn test1() {
    let s = r#"
fn test2();
"#;<CURSOR_HERE>
}

M-x rust-beginning-of-defun jumps to test2 not to test1 as expected.

tromey added a commit to tromey/rust-mode that referenced this issue Aug 2, 2017
Change rust-beginning-of-defun to keep searching when it stops in a
comment or a string.  Fixes rust-lang#222.
@tromey
Copy link
Contributor

tromey commented Aug 2, 2017

If you try this patch out, and it works for you, let me know and I will merge it. Thanks.

@Dushistov
Copy link
Author

@tromey

Thanks, I tested this patch and it works for me.

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

No branches or pull requests

2 participants