#![forbid(unsafe_code)]
pub mod buffer {
pub use hjkl_buffer::{
Buffer, BufferView, Edit, Fold, Gutter, MotionKind, Position, RowSpan, Selection, Sign,
Span, StyleResolver, Viewport, Wrap,
};
}
pub mod runtime {
pub use hjkl_engine::{
Editor, Input, Key, KeybindingMode, LspIntent, Registers, SearchPrompt, Slot, VimMode,
};
pub mod ex {
pub use hjkl_engine::ex::*;
}
}
pub mod spec {
pub use hjkl_engine::types::{
Attrs, BufferId, Color, CursorShape, Edit, EngineError, Highlight, HighlightKind, Host,
Input, Mode, Modifiers, MouseEvent, MouseKind, Options, Pos, Selection, SelectionKind,
SelectionSet, SpecialKey, Style, Viewport,
};
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn legacy_editor_constructs() {
let _ = runtime::Editor::new(runtime::KeybindingMode::Vim);
}
#[test]
fn buffer_constructs() {
let _ = buffer::Buffer::from_str("hello\nworld");
}
#[test]
fn spec_options_default() {
let opts = spec::Options::default();
assert_eq!(opts.tabstop, 8);
}
#[test]
fn spec_selection_set_default() {
let set = spec::SelectionSet::default();
assert_eq!(set.items.len(), 1);
}
}