Skip to content

Jump char conflicts with continuation #32

Description

@matklad

Consider the following screenshot:

image

What I want to do here is to jump to any of eprintln!s. So, I start typing ep. However, after I type e, there's a "jump char" p to jump to ident, so I end up in the wrong place.

It seems to me that, in the situation as above, after typing e, p shouldn't be considered as jump char.

Here's the above snippet as text:

fn go(
    symbols: &Symbols,
    curr: id::Mod,
    path: ast::PathRef<'_>,
) -> Result<ModSymbol, Diagnostic> {
    let curr = match path.qualifier() {
        Some(qual) => go(symbols, curr, qual)?,
        None => ModSymbol::Mod(curr),
    };
    eprintln!("path = {}", path);
    eprintln!("curr = {:?}", curr);
    let ident = match path.ident() {
        Some(it) => it,
        None => return Err(Diagnostic::InvalidSyntax),
    };
    let mod_ = match curr {
        ModSymbol::Fun(_) => return Err(Diagnostic::BadPath { path: path.id() }),
        ModSymbol::Mod(it) => it,
    };
    let name = symbols.source().add_name(ident.text());
    symbols[mod_]
        .scope
        .get(&name)
        .copied()
        .ok_or_else(|| Diagnostic::UnresolvedReceiver { receiver: ident.id() })
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions