rust-lang / rust-enhanced

The official Sublime Text 4 package for the Rust Programming Language
MIT License
780 stars 104 forks source link

Empty span highlight is not obvious (looks like a vertical bar cursor) #421

Open Ultra-Instinct-05 opened 4 years ago

Ultra-Instinct-05 commented 4 years ago

Sublime Text Version

Sublime Text 3 (Build 3211)

Rust Enhanced Version

v2.21.0

Operating system

Windows 7 Professional 64 bit OS

Expected behavior

When the block_caret attribute is set to true in Preferences.sublime-settings - User, the thin caret should disappear & the block caret should appear.

Actual behavior

The thin caret appears whenever a rust file with errors is saved.

Steps to reproduce

  1. Set the block_caret attribute to true in Preferences.sublime-settings - User
  2. Create a new .rs file and save it (deliberately introduce some error like a missing semicolon).
  3. The old caret appears at the line containing the error. It seems to just stay there and doesn't affect the block caret.

References

None

Additional Details

Packages installed:

  1. Automatic Package Reloader
  2. Dart
  3. Terminus
  4. PackageDev
  5. Emmet

GIF example

example

ehuss commented 4 years ago

This is expected behavior. This is not a caret, it is an empty phantom showing the location of an error.

The plugin currently uses Sublime's DRAW_EMPTY option. We could add an option (or just switch) to use DRAW_EMPTY_AS_OVERWRITE which draws a little horizontal bar instead of a vertical one. I'm not sure if that is any more obvious, though.

image