72b9311678
The top of a view is marked by a char idx anchor. That char idx is usually the first character of the visual line it's on. We use a char index instead of a line index because the view may start in the middle of a line with soft wrapping. However, it's possible to temporarily endup in a state where this anchor is not the first character of the first visual line. This is pretty rare because edits usually happen inside/after the view. In most cases we handle this case correctly. However, if the cursor is before the anchor (but still in view) there can be crashes or visual artifacts. This is caused by the fact that visual_offset_from_anchor (and the positioning code in view.rs) incorrectly assumed that the (cursor) position is always after the view anchor if the cursor is in view. But if the anchor is not the first character of the first visual line this is not the case anymore. In that case crashes and visual artifacts are possible. This commit fixes that problem by changing `visual_offset_from_anchor` (and callsites) to properly consider that case. |
2 years ago | |
---|---|---|
.cargo | 2 years ago | |
.github | 2 years ago | |
book | 2 years ago | |
contrib | 2 years ago | |
docs | 2 years ago | |
helix-core | 2 years ago | |
helix-dap | 2 years ago | |
helix-loader | 2 years ago | |
helix-lsp | 2 years ago | |
helix-parsec | 2 years ago | |
helix-term | 2 years ago | |
helix-tui | 2 years ago | |
helix-vcs | 2 years ago | |
helix-view | 2 years ago | |
runtime | 2 years ago | |
xtask | 2 years ago | |
.envrc | 3 years ago | |
.gitattributes | 2 years ago | |
.gitignore | 2 years ago | |
.ignore | 2 years ago | |
CHANGELOG.md | 2 years ago | |
Cargo.lock | 2 years ago | |
Cargo.toml | 2 years ago | |
LICENSE | 4 years ago | |
README.md | 2 years ago | |
VERSION | 2 years ago | |
base16_theme.toml | 2 years ago | |
default.nix | 2 years ago | |
flake.lock | 2 years ago | |
flake.nix | 2 years ago | |
grammars.nix | 2 years ago | |
languages.toml | 2 years ago | |
logo.svg | 2 years ago | |
logo_dark.svg | 2 years ago | |
logo_light.svg | 2 years ago | |
rust-toolchain.toml | 2 years ago | |
rustfmt.toml | 3 years ago | |
screenshot.png | 3 years ago | |
shell.nix | 2 years ago | |
theme.toml | 2 years ago |
README.md
A Kakoune / Neovim inspired editor, written in Rust.
The editing model is very heavily based on Kakoune; during development I found myself agreeing with most of Kakoune's design decisions.
For more information, see the website or documentation.
All shortcuts/keymaps can be found in the documentation on the website.
Features
- Vim-like modal editing
- Multiple selections
- Built-in language server support
- Smart, incremental syntax highlighting and code editing via tree-sitter
It's a terminal-based editor first, but I'd like to explore a custom renderer (similar to Emacs) in wgpu or skulpin.
Note: Only certain languages have indentation definitions at the moment. Check
runtime/queries/<lang>/
for indents.scm
.
Installation
Contributing
Contributing guidelines can be found here.
Getting help
Your question might already be answered on the FAQ.
Discuss the project on the community Matrix Space (make sure to join #helix-editor:matrix.org
if you're on a client that doesn't support Matrix Spaces yet).
Credits
Thanks to @JakeHL for designing the logo!