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

Can't Type After Clicking Rust Check Compiler Error Bookmark #465

Open
turchiad opened this issue Jun 9, 2021 · 3 comments
Open

Can't Type After Clicking Rust Check Compiler Error Bookmark #465

turchiad opened this issue Jun 9, 2021 · 3 comments
Labels
A-messages Area: Build messages

Comments

@turchiad
Copy link

turchiad commented Jun 9, 2021

Description

Using packages Rust Enhanced, RustFmt and LSP with rust-analyzer, when compiling using Cntrl+S, errors may sometimes provide clickable links to the source of the error (e.g. See Primary: ↓: 99). After clicking on the link, typing is disabled until the file is closed out and reopened. Reopening Sublime does not solve this. Note: this is not an issue with Vintage being ignored or not.

Steps to reproduce

  1. Start Sublime Text (Build 4107) with Rust Enhanced, Rustfmt, and LSP with rust-analyzer
  2. Produce an error that makes the compiler provide a clickable link (such as the code below)
enum Test {
    TestOne,
    TestTwo,
}

fn main() {
    match TestOne {
        TestOne => println!("Test"),
    }
}
  1. Save, letting Rust check run.
  2. Click "See Primary: ↓: 7"
  3. Attempt to type.

Expected behavior

It's expected to reposition the cursor near the error.

Actual behavior

The cursor is repositioned near the error, but typing is disabled until the file is closed and reopened. view.is_read_only() returns True

Environment

  • Build: 4107
  • Operating system and version: Fedora 34
  • Desktop Environment and/or Window Manager: Gnome
@Bobo1239
Copy link

I've also noticed this and have found #432. The problem is probably that the file you're looking at isn't part of your current Sublime project so it's marked as external so rust-enhanced set's the view to read-only when you click on it. What I'm not sure about is whether this is intended behavior since the linked PR message says that this should only affect external macros but the code affects all links afaict.

@turchiad
Copy link
Author

I actually noticed that this behavior has disappeared after I started loading projects into Sublime and not just individual files. I can confirm that this happens even with internal links (to my memory).

@ehuss ehuss added the A-messages Area: Build messages label Jun 11, 2022
@minirop
Copy link

minirop commented Apr 2, 2024

The issue (if that's the same cause) is simpler than that. I have the issue with single file. On save, when there are errors, randomly¹, Sublime's view will be set in read only. To fix it, I open the console and type view.set_read_only(False).

¹: sometimes I have the issue every time I save, and sometimes I can go several hours without encountering it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-messages Area: Build messages
Projects
None yet
Development

No branches or pull requests

4 participants