From 505adef39e75821e18a04517ec32d92d8dffd8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikodem=20Rabuli=C5=84ski?= Date: Fri, 6 Oct 2023 22:51:59 +0200 Subject: [PATCH] Fix documentation and integration tests --- book/src/generated/typable-cmd.md | 4 ++++ helix-term/tests/test/splits.rs | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/book/src/generated/typable-cmd.md b/book/src/generated/typable-cmd.md index cf1b550dc..c86c81fdf 100644 --- a/book/src/generated/typable-cmd.md +++ b/book/src/generated/typable-cmd.md @@ -59,6 +59,10 @@ | `:debug-start`, `:dbg` | Start a debug session from a given template with given parameters. | | `:debug-remote`, `:dbg-tcp` | Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters. | | `:debug-eval` | Evaluate expression in current debug context. | +| `:tab-new` | Create a new tab. | +| `:tab-next` | Goto next tab. | +| `:tab-previous` | Goto previous tab. | +| `:tab-rename` | Change the name of the current tab. | | `:vsplit`, `:vs` | Open the file in a vertical split. | | `:vsplit-new`, `:vnew` | Open a scratch buffer in a vertical split. | | `:hsplit`, `:hs`, `:sp` | Open the file in a horizontal split. | diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs index 3ba5a504b..2964e4eeb 100644 --- a/helix-term/tests/test/splits.rs +++ b/helix-term/tests/test/splits.rs @@ -47,14 +47,14 @@ async fn test_split_write_quit_all() -> anyhow::Result<()> { assert_eq!("hello3", doc3.text().to_string()); helpers::assert_status_not_error(&app.editor); - assert_eq!(3, app.editor.tree.views().count()); + assert_eq!(3, app.editor.tabs.curr_tree().views().count()); }), ), ( Some(":wqa"), Some(&|app| { helpers::assert_status_not_error(&app.editor); - assert_eq!(0, app.editor.tree.views().count()); + assert_eq!(0, app.editor.tabs.curr_tree().views().count()); }), ), ], @@ -82,7 +82,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> { ( Some("Oihello:spogoodbye"), Some(&|app| { - assert_eq!(2, app.editor.tree.views().count()); + assert_eq!(2, app.editor.tabs.curr_tree().views().count()); helpers::assert_status_not_error(&app.editor); let mut docs: Vec<_> = app.editor.documents().collect(); @@ -102,7 +102,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> { Some(":wq"), Some(&|app| { helpers::assert_status_not_error(&app.editor); - assert_eq!(1, app.editor.tree.views().count()); + assert_eq!(1, app.editor.tabs.curr_tree().views().count()); let mut docs: Vec<_> = app.editor.documents().collect(); assert_eq!(1, docs.len());