From 1e99b628288ee0f0adf9a7f5654c3ba94c487467 Mon Sep 17 00:00:00 2001 From: Ingrid Date: Sun, 11 Feb 2024 20:16:08 +0100 Subject: [PATCH] rename session to persistence --- helix-loader/src/lib.rs | 2 +- helix-loader/src/{session.rs => persistence.rs} | 0 helix-term/src/application.rs | 8 ++++---- helix-term/src/ui/prompt.rs | 4 ++-- helix-view/src/editor.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename helix-loader/src/{session.rs => persistence.rs} (100%) diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs index 12abd93b9..4ff9df88d 100644 --- a/helix-loader/src/lib.rs +++ b/helix-loader/src/lib.rs @@ -1,6 +1,6 @@ pub mod config; pub mod grammar; -pub mod session; +pub mod persistence; use helix_stdx::{env::current_working_dir, path}; diff --git a/helix-loader/src/session.rs b/helix-loader/src/persistence.rs similarity index 100% rename from helix-loader/src/session.rs rename to helix-loader/src/persistence.rs diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 810cd2521..d3d6f73cf 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -1,7 +1,7 @@ use arc_swap::{access::Map, ArcSwap}; use futures_util::Stream; use helix_core::{diagnostic::Severity, pos_at_coords, syntax, Selection}; -use helix_loader::session; +use helix_loader::persistence; use helix_lsp::{ lsp::{self, notification::Notification}, util::lsp_range_to_range, @@ -153,7 +153,7 @@ impl Application { &config.editor })), handlers, - HashMap::from_iter(session::read_file_history().iter().map(|entry| { + HashMap::from_iter(persistence::read_file_history().iter().map(|entry| { ( entry.path.clone(), ViewPosition { @@ -169,13 +169,13 @@ impl Application { #[cfg(not(feature = "integration"))] editor .registers - .write(':', session::read_command_history()) + .write(':', persistence::read_command_history()) // TODO: do something about this unwrap .unwrap(); #[cfg(not(feature = "integration"))] editor .registers - .write('/', session::read_search_history()) + .write('/', persistence::read_search_history()) // TODO: do something about this unwrap .unwrap(); diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 14fa6e0f2..e64deadab 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -2,7 +2,7 @@ use crate::compositor::{Component, Compositor, Context, Event, EventResult}; use crate::{alt, ctrl, key, shift, ui}; use arc_swap::ArcSwap; use helix_core::syntax; -use helix_loader::session; +use helix_loader::persistence; use helix_view::document::Mode; use helix_view::input::KeyEvent; use helix_view::keyboard::KeyCode; @@ -616,7 +616,7 @@ impl Component for Prompt { cx.editor.set_error(err.to_string()); } #[cfg(not(feature = "integration"))] - session::push_reg_history(register, &self.line); + persistence::push_reg_history(register, &self.line); }; } diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f75019121..8ef3a940e 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -13,7 +13,7 @@ use crate::{ Document, DocumentId, View, ViewId, }; use dap::StackFrame; -use helix_loader::session::{push_file_history, FileHistoryEntry}; +use helix_loader::persistence::{push_file_history, FileHistoryEntry}; use helix_vcs::DiffProviderRegistry; use futures_util::stream::select_all::SelectAll;