aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--helix-term/src/compositor.rs2
-rw-r--r--helix-term/src/main.rs9
-rw-r--r--helix-tui/src/terminal.rs8
4 files changed, 15 insertions, 11 deletions
diff --git a/README.md b/README.md
index d867b007..fa7c37f8 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,13 @@ Some suggestions to get started:
We provide an [architecture.md](./docs/architecture.md) that should give you
a good overview of the internals.
+## Usage
+
+### Keyboard shortcuts / Keymap
+
+All shortcuts/keymaps can be found in the documentation on the website:
+- https://docs.helix-editor.com/keymap.html
+
# Getting help
Discuss the project on the community [Matrix channel](https://matrix.to/#/#helix-community:matrix.org).
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 3a17904d..7753e0a5 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -122,7 +122,9 @@ impl Compositor {
}
pub fn render(&mut self, cx: &mut Context) {
+ self.terminal.autoresize().unwrap();
let area = self.size();
+
let surface = self.terminal.current_buffer_mut();
for layer in &self.layers {
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 3a0f4d20..da03569d 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -51,7 +51,8 @@ pub struct Args {
files: Vec<PathBuf>,
}
-fn main() -> Result<()> {
+#[tokio::main]
+async fn main() -> Result<()> {
let help = format!(
"\
{} {}
@@ -113,13 +114,9 @@ FLAGS:
let config = toml::from_slice(toml).context("Could not parse languages.toml")?;
LOADER.get_or_init(|| Loader::new(config));
- let runtime = tokio::runtime::Runtime::new().context("unable to start tokio runtime")?;
-
// TODO: use the thread local executor to spawn the application task separately from the work pool
let mut app = Application::new(args).context("unable to create new appliction")?;
- runtime.block_on(async move {
- app.run().await;
- });
+ app.run().await;
Ok(())
}
diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs
index 7346d66d..1a0cae3e 100644
--- a/helix-tui/src/terminal.rs
+++ b/helix-tui/src/terminal.rs
@@ -138,11 +138,9 @@ where
/// Queries the backend for size and resizes if it doesn't match the previous size.
pub fn autoresize(&mut self) -> io::Result<()> {
- if self.viewport.resize_behavior == ResizeBehavior::Auto {
- let size = self.size()?;
- if size != self.viewport.area {
- self.resize(size)?;
- }
+ let size = self.size()?;
+ if size != self.viewport.area {
+ self.resize(size)?;
};
Ok(())
}